Commit Graph

897 Commits

Author SHA1 Message Date
rumble
28f5ebd853 Create sysctl entries during module initialisation and destroy them
appropriately.

Many of these file systems are now ready for modularisation.
2008-06-28 01:34:05 +00:00
reinoud
d769966488 Count the length correctly when encountering an allocation extension
redirect in the sanity checking.
2008-06-26 13:28:45 +00:00
reinoud
93d7f858ba Disable read/write mounting for metadatapartition since attempts to delete
files now corrupt the image due to the lack of allocation scheme support.
2008-06-25 16:06:29 +00:00
reinoud
30c78783eb Allow metadata partitioned discs to be mounted read-write even though its
allocation scheme is not implemented yet. Creating new files or deleting
anything is thus not possible.
2008-06-25 15:59:24 +00:00
reinoud
ca7a0d4ebd Fix lookup problems in very fragmented metadata partitions that use
allocation extent descriptors.
2008-06-25 15:28:29 +00:00
reinoud
7536094ea3 Bump maximum number of allocation extents descriptors in a file/directory;
10 did seem far too many, but aparently ``640 kb should be enough for
everyone''.
2008-06-25 15:27:14 +00:00
reinoud
e5ee834164 Fix extended allocation descriptor handling in translate file extent 2008-06-25 10:46:35 +00:00
reinoud
35d8dddabd Fix allocation extensions descriptor reading and do free them on node
destruction!
2008-06-25 10:03:14 +00:00
cegger
dfd2a09df6 make this build with SMB_VNODE_DEBUG. makes i386 ALL kernel build again. 2008-06-24 17:04:11 +00:00
reinoud
06993e5f51 Make readsymlink bug-tolerant to MacOS X symlink construction bug. It puts
the name ".." on a parent path component. To prevent other similar errors,
name length checking is not done but the passed name that shouldn't be
passed is ignored.
2008-06-24 15:57:13 +00:00
reinoud
dc6314f8ae We are not allowed zero length names in softlinks. 2008-06-24 15:42:07 +00:00
reinoud
a88cc8528f Support the creation of extended attributes for file creation in the
kernel and check and update them when found.

Note that it won't *insert* an extended attribute yet if it hasn't found it
while updating the birthtime.
2008-06-24 15:35:57 +00:00
reinoud
31c0e74b8e If we're fixing up the internal attributes, is it then wise to check if
they are valid first? Might be on the safe side in the end but disabled for
now.
2008-06-24 15:32:52 +00:00
reinoud
826b10cc95 Fix attribute length calculation and fix naming convention. 2008-06-24 15:30:33 +00:00
gmcgarry
92d3d70827 Remove gcc extension of variadic macros with comma elimination. 2008-06-24 10:23:48 +00:00
reinoud
6eab4517fa Elaborate file times extension times definition. 2008-06-21 00:12:09 +00:00
skd
4537375ada add NULL arg so it will compile. 2008-06-20 00:07:47 +00:00
skd
8ec4d769f6 add arg so it will compile. 2008-06-19 23:57:22 +00:00
christos
13a3f67856 - setting the birthdate is valid in setattr.
- don't call nanotime if not needed.
- don't call tempfs_update() if tempfs_chtimes succeeded, because it just did.
2008-06-19 19:03:44 +00:00
reinoud
9d15fe5137 Cleanup file access,modification,attribute and birthtime setting of files
and make the modification time when set never older than the creation time.
2008-06-18 21:23:32 +00:00
reinoud
a61f3416a6 Change comments on marking buffer busy. 2008-06-17 14:14:05 +00:00
reinoud
09dda43103 Remove bogus KASSERT(); if we shrink the file, the number of allocated
blocsk are of course not the same... duh!
2008-05-20 21:31:52 +00:00
jmcneill
e9336f3218 Add module dependency on putter. 2008-05-20 14:19:18 +00:00
christos
b423ea8c48 fix argument type. 2008-05-19 23:48:04 +00:00
reinoud
8902baa622 Implement wide char support for UDF by properly implementing unicode-16 to
UTF-8 like cd9660 and ntfs already do.
2008-05-19 20:12:36 +00:00
ad
a0fd5bc68d Until these get fixed or replaced:
WARNING: the foo file system is experimental and may be unstable
2008-05-18 13:56:12 +00:00
reinoud
f6082a17d0 Cleaner gcc initialisation detection failure notice. 2008-05-17 08:07:21 +00:00
reinoud
2e63f0acb5 Fix `uninitialised variable' warning issued by the sh3 compiler. gcc can't
detect that the `last_node' variable will be set before used since it can't
parse the semantics of `TAILQ_EMPTY()' that is used as a guard first.

Thanks for H?rvard for finding and reporting it :)
2008-05-17 07:46:35 +00:00
hannken
5d2bff060a Make sure all cached buffers with valid, not yet written data have been
run through copy-on-write.  Call fscow_run() with valid data where possible.

The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.

- Add a flag B_MODIFY to bread(), breada() and breadn().  If set the caller
  intends to modify the buffer returned.

- Always run copy-on-write on buffers returned from ffs_balloc().

- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
  may clear the buffer and runs copy-on-write.  Process possible errors
  from getblk() or fscow_run().  Part of PR kern/38664.

Welcome to 4.99.63

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
2008-05-16 09:21:59 +00:00
reinoud
69e96f0544 Introduce new UDF debug class and split rmw strategy debugging prints. 2008-05-15 14:22:40 +00:00
reinoud
1ff90d64ad Add accidently removed lines when i pruned the code for release. Important
update.
2008-05-15 10:57:40 +00:00
reinoud
e979c658c9 Import writing part of the UDF file system making optical media like CD's
and DVD's behave like floppy discs. Writing is supported upto and including
version 2.01; version 2.50 and 2.60 will follow.

Also extending the UDF implementation to support symbolic links and
hardlinks.

Added are the mmcformat(8) tool to format rewritable CD/DVD discs and
newfs_udf(8).

Limitations:
        all operations can be performed on the file system though the
        sheduling is currently optimised for archiving workloads.

        mv(1)/rename(2) is currently only implemented for non-directories.
2008-05-14 16:49:47 +00:00
simonb
2fd5130380 mnt_data is a pointer, set it to NULL not 0 when we're finished with it. 2008-05-13 08:31:12 +00:00
simonb
03a48736d2 Use the correct malloc type when free()ing the ptyfs mount structure.
Fixes the "free 2: inuse 0, probable double free" panic when using ptyfs
and KMEMSTATS.
2008-05-13 05:36:43 +00:00
rumble
a1221b6d4a Convert file systems to dynamically attach with the new module interface.
Make VFS hooks dynamic while we're here and say farewell to VFS_ATTACH and
VFS_HOOKS_ATTACH linksets.

As a consequence, most of the file systems can now be loaded as new style
modules.

Quick sanity check by ad@.
2008-05-10 02:26:09 +00:00
ad
42d0626726 PR kern/38141 lookup/vfs_busy acquire rwlock recursively
Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.
2008-05-06 18:43:44 +00:00
ad
ed8a08bae0 PR kern/37950 Unmounting psshfs immediately panics the machine
puffs_getvnode() was inserting vnodes into mnt_vnodelist without taking
a reference to the mount for each. When vnodes are scrubbed, refs to the
vnodes mount structure are dropped => boom.
2008-05-06 12:33:16 +00:00
ad
e071d39c84 - Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.
2008-05-05 17:11:16 +00:00
ad
dae796ef8b Convert cd9660 to attach as a module. 2008-05-03 15:57:41 +00:00
ad
1498ad220e Make various bits of debug code compile again. 2008-04-30 14:07:13 +00:00
ad
928a6b2096 PR kern/38135 vfs_busy/vfs_trybusy confusion
The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.
2008-04-30 12:49:16 +00:00
ad
e3610f1886 kern/38135 vfs_busy/vfs_trybusy confusion
The symptom was that sometimes file systems would occasionally not appear
in output from 'df' or 'mount' if the system was busy. Resolution:

- Make mount locks work somewhat like vm_map locks.
- vfs_trybusy() now only fails if the mount is gone, or if someone is
  unmounting the file system. Simple contention on mnt_lock doesn't
  cause it to fail.
- vfs_busy() will wait even if the file system is being unmounted.
2008-04-29 23:51:04 +00:00
ad
baa3395f8f PR kern/38057 ffs makes assuptions about devvp file system
PR kern/33406 softdeps get stuck in endless loop

Introduce VFS_FSYNC() and call it when syncing a block device, if it
has a mounted file system.
2008-04-29 18:18:08 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad
6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
ad
a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
rmind
c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
matt
9a1bbaab37 Convert to ansi definitions from old-style definitons. 2008-02-27 19:59:48 +00:00
matt
8014191a2e Convert to ansi definitions from old-style definitons. 2008-02-27 19:43:36 +00:00
ad
1a710239b8 A port of FreeBSD's updated unionfs. This is a work in progress. In
particular, unionfs_lookup() needs a lot of attention.
2008-02-18 16:44:22 +00:00