Erez Zadok [Fri, 18 May 2007 05:39:26 +0000 (01:39 -0400)]
Verify and maintain fanout invariants.
This somewhat long patch calls various invariant-checking (debugging)
functions in all places where the fanout invariants should hold. The three
invariant-checking functions, __unionfs_check_{inode,dentry,file}, perform
exhaustive sanity checking on the fan-out of various Unionfs objects. We
check that no lower objects exist outside the start/end branch range; that
all objects within are non-NULL (with some allowed exceptions); that for
every lower file there's a lower dentry+inode; that the start/end ranges
match for all corresponding lower objects; that open files/symlinks have
only one lower objects, but directories can have several; and more.
The rest of this patch actually fixes many places where these invariants did
not hold, which could lead to bugs or corruptions under heavy loads,
multi-threaded workloads, dynamic branch-management, and mmap operations.
Most of the bugs related to actions involving copyups and whiteouts. With
these fixes, the entire Unionfs regression suite passes without a single
invariant violated.
Erez Zadok [Fri, 18 May 2007 05:31:14 +0000 (01:31 -0400)]
Post-copyup helper functions
Two functions which are very useful to execute common actions needed after a
copy-up had taken place.
Erez Zadok [Fri, 18 May 2007 05:28:00 +0000 (01:28 -0400)]
Introduce compile-time debugging support to Unionfs
Similar to other file systems, to turn on debugging, one is asked to change
the Makefile slightly. The vast majority of the debugging utility functions
are in debug.c. They are useful for developers and users to report to
developers. The main code has some very useful hooks left behind that are
non-intrusive and cleaner (i.e., no "ifdef DEBUG" clutter).
Erez_Zadok [Fri, 11 May 2007 05:55:19 +0000 (01:55 -0400)]
bugfixes: correctly decrement refcounts of mnt's upon branch management
The old logic was broken in one place, which another place tried to "fix"
incorrectly. Also added detailed comments to explain the new/correct logic.
Erez_Zadok [Fri, 11 May 2007 05:51:48 +0000 (01:51 -0400)]
bugfix in BUG_ON use: actually catch bad use of unionfs_mntput
Yiannis Pericleous [Sun, 29 Apr 2007 02:06:46 +0000 (22:06 -0400)]
cleanup: removed a trailing whitespace
Erez_Zadok [Fri, 4 May 2007 18:50:01 +0000 (14:50 -0400)]
bugfix: remove defunct unionfs_put_inode method
Removed old workaround code that was needed to get mmap working, is no
longer needed with recent kernels.
Erez_Zadok [Fri, 4 May 2007 18:44:02 +0000 (14:44 -0400)]
optimize branch overlapping test a bit
Erez_Zadok [Mon, 30 Apr 2007 21:30:48 +0000 (17:30 -0400)]
Documentation update regarding overlapping branches and new lookup code.
Added detailed comment and updated documentation (issues.txt) to explain why
overlapping branches are disallowed, better explain cache coherency issues,
and mention upcoming do_lookup_lookup changes.
Erez_Zadok [Mon, 30 Apr 2007 20:42:30 +0000 (16:42 -0400)]
branch management: disallow setting leftmost branch to readonly
Unionfs requires the leftmost branch to be writeable for copyup to work
properly and simply. If, through branch-management commands (add, delete,
or mode change), the leftmost branch will becomes readonly, then return an
error (and tell the user to use "remount,ro" if they want a readonly union).
Erez_Zadok [Sun, 29 Apr 2007 23:33:25 +0000 (19:33 -0400)]
fsstack: 4th case to do_path_lookup
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez_Zadok [Fri, 27 Apr 2007 16:35:44 +0000 (12:35 -0400)]
Revert "Unionfs: Check remount options for being NULL"
This reverts commit
49491b290f0f791a531316c6197437547985537b.
Erez_Zadok [Thu, 19 Apr 2007 22:40:36 +0000 (18:40 -0400)]
bugfix: don't leak resources when copyup fails partially
Erez_Zadok [Wed, 18 Apr 2007 06:08:14 +0000 (02:08 -0400)]
cleanup: call our unionfs_{unlock,lock}_dentry instead of mutex ops.
This is for consistency with the rest of the code, which helps us place
debugging code when un/locking our special "info" mutex in our dentries.
Erez Zadok [Sun, 15 Apr 2007 21:43:53 +0000 (17:43 -0400)]
cleanup: rename our "do_rename" to __unionfs_rename.
To avoid confusion with the VFS-named function do_rename, and to help ctags,
rename our utility (static) function "do_rename" to "__unionfs_rename".
Erez Zadok [Sun, 15 Apr 2007 21:37:40 +0000 (17:37 -0400)]
cleanup: rename prefix our version of double_lock_dentry with "unionfs_"
To avoid potential confusion with the VFS function of the same name (and
also confusion with ctags), rename our special version of double_lock_dentry
to unionfs_double_lock_dentry.
Erez_Zadok [Fri, 13 Apr 2007 22:33:41 +0000 (18:33 -0400)]
Cleanup: ensure space between every comma-delimited function argument list
Erez_Zadok [Wed, 28 Mar 2007 16:42:37 +0000 (12:42 -0400)]
cleanup: rewrite long while(1) loop more cleanly
Erez Zadok [Sun, 25 Mar 2007 05:37:15 +0000 (01:37 -0400)]
Move one function off of branchman.c and remove source file.
After branch-management support was added, branchman.c became obsolete: it
used to hold the old ioctl-based branch-management commands, but now we do
those commands via remount (in super.c). So move the only remaining small
query-file ioctl from branchman.c to commonfops.c, close to unionfs_ioctl;
and remove any leftover extern's which referred to old code in branchman.c
Erez Zadok [Sun, 25 Mar 2007 05:29:41 +0000 (01:29 -0400)]
cleanup: consistent pointer declaration spacing.
Change instances of "foo * var" to "foo *var" for consistency.
Erez Zadok [Sun, 25 Mar 2007 05:24:54 +0000 (01:24 -0400)]
Merge unionfs_write with __unionfs_write.
Merge the two functions because unionfs_write was a small function and the
only one which called the __unionfs_write. This saves on stack space and
clarifies code a bit.
Erez Zadok [Sun, 25 Mar 2007 05:12:48 +0000 (01:12 -0400)]
cleanup: fix one odd indentation and long line breakup.
Erez Zadok [Sun, 25 Mar 2007 04:27:12 +0000 (00:27 -0400)]
Commenting the code.
Audited entire code for documentation. Added comments at top of functions
where it felt necessary (i.e., function's name and size don't make it clear
what it may be doing precisely). Reformatted some long comments. Fixed a
few comment typos and spelling errors.
Erez Zadok [Sun, 25 Mar 2007 03:14:03 +0000 (23:14 -0400)]
cleanup: prefix external functions with 'extern' properly
Erez_Zadok [Sun, 25 Mar 2007 03:01:13 +0000 (23:01 -0400)]
cleanup: one more trailing whitespace removed.
Erez_Zadok [Sun, 25 Mar 2007 00:06:44 +0000 (20:06 -0400)]
cleanup: spell check all strings and comments
Erez_Zadok [Sat, 24 Mar 2007 23:56:56 +0000 (19:56 -0400)]
cleanup: use consistent style for multi-line comments
Erez_Zadok [Sat, 24 Mar 2007 23:41:58 +0000 (19:41 -0400)]
cleanup: keep all top-of-function automatic variables clustered together
Erez_Zadok [Sat, 24 Mar 2007 23:32:42 +0000 (19:32 -0400)]
coding-style: remove one more {braces} around one-statement code block
Erez_Zadok [Sat, 24 Mar 2007 23:31:28 +0000 (19:31 -0400)]
cleanup: remove unnecessary blank lines in short code blocks
Erez_Zadok [Sat, 24 Mar 2007 23:21:51 +0000 (19:21 -0400)]
cleanup: add missing copyright notices
Erez_Zadok [Sat, 24 Mar 2007 23:14:18 +0000 (19:14 -0400)]
coding-style: reformat lines longer than 80 chars (accounting for TABs)
Erez_Zadok [Sat, 24 Mar 2007 22:36:59 +0000 (18:36 -0400)]
cleanup: every printk should prefix with "unionfs: " consistently
Erez_Zadok [Sat, 24 Mar 2007 22:19:49 +0000 (18:19 -0400)]
coding-style: remove unnecessary {braces} around one-line code blocks
Erez_Zadok [Sat, 24 Mar 2007 22:11:10 +0000 (18:11 -0400)]
coding-style: no lines over 80 chars
Erez_Zadok [Sat, 24 Mar 2007 21:57:56 +0000 (17:57 -0400)]
coding-style: indent every line properly
Erez_Zadok [Sat, 24 Mar 2007 21:41:57 +0000 (17:41 -0400)]
cleanup: remove trailing spaces
Erez_Zadok [Sat, 24 Mar 2007 20:28:59 +0000 (16:28 -0400)]
Documentation: fix spelling error
Erez_Zadok [Sat, 24 Mar 2007 20:19:40 +0000 (16:19 -0400)]
Documentation: minor typo fixed in incgen remount option
Josef 'Jeff' Sipek [Sat, 19 May 2007 07:14:30 +0000 (03:14 -0400)]
Unionfs: SLAB_CTOR_CONSTRUCTOR has been removed from vanilla
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Pekka Enberg [Sun, 13 May 2007 16:55:44 +0000 (12:55 -0400)]
[PATCH] unionfs: fix slab abuses with krealloc
This changes unionfs to use krealloc() for reallocating memory so that we
don't need to play tricks with slab internals.
Cc: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Adrian Bunk [Sat, 5 May 2007 19:28:33 +0000 (15:28 -0400)]
[PATCH] fix unionfs compilation
On Sat, May 05, 2007 at 01:49:55AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.21-rc7-mm2:
>...
> git-unionfs.patch
>...
> git trees
>...
<-- snip -->
...
CC fs/unionfs/super.o
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/unionfs/super.c: In function ‘init_once’:
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/unionfs/super.c:822: error: ‘SLAB_CTOR_VERIFY’ undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/unionfs/super.c:822: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/unionfs/super.c:822: error: for each function it appears in.)
make[3]: *** [fs/unionfs/super.o] Error 1
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Adrian Brunyate [Thu, 26 Apr 2007 22:51:16 +0000 (18:51 -0400)]
Unionfs: Check remount options for being NULL
Signed-off-by: Adrian Brunyate <abrunyate@yahoo.com>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Adrian Brunyate [Thu, 26 Apr 2007 22:51:09 +0000 (18:51 -0400)]
Unionfs: Accept MS_SILENT during remount
[jsipek: whitespace cleanup]
Signed-off-by: Adrian Brunyate <abrunyate@yahoo.com>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 23 Mar 2007 17:10:46 +0000 (13:10 -0400)]
Unionfs: Don't inline do_remount_{add,del,mode}_option
gcc4 decided to inline do_remount_{add,del,mode}_option creating an 600 byte
stack abuser on a x86_64 test box.
Reported by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 23 Mar 2007 17:07:14 +0000 (13:07 -0400)]
Unionfs: Added several BUG_ONs to assert dentry validity
This should help catch races between the VFS and the branch-management code.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 23 Mar 2007 00:17:48 +0000 (20:17 -0400)]
Unionfs: Properly handle stale inodes passed to unionfs_permission
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 23 Mar 2007 00:09:07 +0000 (20:09 -0400)]
Unionfs: Pass lowernd to lower ->revalidate function
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 23 Mar 2007 00:08:30 +0000 (20:08 -0400)]
Unionfs: vfsmount reference counting fixes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 23 Mar 2007 00:01:56 +0000 (20:01 -0400)]
Unionfs: unionfs_create needs to revalidate the dentry
We have to read-lock the superblock rwsem, and we have to revalidate the
parent dentry and this one. A branch-management operation could have taken
place, mid-way through a VFS operation that eventually reaches
unionfs_create(). So we have to ensure consistency, just as we do with the
file operations.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Thu, 22 Mar 2007 23:47:43 +0000 (19:47 -0400)]
Unionfs: Decrement totalopens counter on error in unionfs_open
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sun, 18 Mar 2007 20:30:45 +0000 (16:30 -0400)]
Unionfs: Document unionfs_d_release locking
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sun, 18 Mar 2007 20:22:03 +0000 (16:22 -0400)]
Unionfs: Remove the older incgen ioctl
The new remount code now has the "incgen" functionality.
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Thu, 22 Mar 2007 23:32:40 +0000 (19:32 -0400)]
Unionfs: Grab the unionfs sb private data lock around branch info users
Locking/concurrency/race fixes. Use the unionfs superblock rwsem, and grab
the read lock around every op that uses branch-related information, such as
branch counters. Grab the write rwsem lock in operations which attempt to
change branch information, such as when adding/deleting branches. This
will, for example, cause branch-management remount commands (which are
infrequent) to block a bit until all in-progress file operations on open
files are done.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
[jsipek: whitespace fixes & more locks/unlocks]
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Tue, 20 Mar 2007 01:02:55 +0000 (21:02 -0400)]
Unionfs: Rewrite unionfs_d_revalidate
Rewrite unionfs_d_revalidate code to avoid stack-unfriendly recursion: split
into a call to revalidate just one dentry, and an interative driver function
to revalidate an entire dentry-parent chain.
Fix vfsmount ref leaks which prevented lower f/s from being unmounted after
generation increment, esp. during heavy loads.
Fix one deadlock between revalidation code and VFS.
Better documentation of what the code does.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
[jsipek: compile & whitespace fixes]
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Tue, 20 Mar 2007 00:57:49 +0000 (20:57 -0400)]
Unionfs: Introduce unionfs_mnt{get,put}
Helper inline functions to perform Unionfs's mntget/put ops on lower
branches.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
[jsipek: cleanup branching in unionfs_mnt{get,put} and compile fixes]
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Tue, 20 Mar 2007 00:44:12 +0000 (20:44 -0400)]
Unionfs: Bulk of branch-management remount code
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Thu, 22 Mar 2007 23:43:29 +0000 (19:43 -0400)]
Unionfs: Introduce branch-id code
Each branch gets a unique ID, which helps during branch additions,
deletions, and changes, to locate where branches were moved to, and perform
proper reference-counting. This is useful even if the same directory was
added more than once to union.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Mon, 9 Apr 2007 13:57:51 +0000 (09:57 -0400)]
Unionfs: Actually verify if dentry's info node is locked
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Mon, 19 Mar 2007 07:01:49 +0000 (03:01 -0400)]
Unionfs: Provide more helpful info on branch leaks during unmount
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
[jsipek: no need to take a read lock on the superblock private data]
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Mon, 19 Mar 2007 04:46:03 +0000 (00:46 -0400)]
Unionfs: Rename unionfs_data sbcount field to more appropriate open_files
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sun, 18 Mar 2007 23:37:51 +0000 (19:37 -0400)]
Unionfs: Proper comment on rwsem field
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 23 Mar 2007 21:17:07 +0000 (17:17 -0400)]
Unionfs: Documentation updates for branch-management
Describe dynamic branch-management introduced by subsequent patches.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Sun, 18 Mar 2007 23:24:29 +0000 (19:24 -0400)]
fs: Export drop_pagecache_sb symbol
Signed-off-by: Erez Zadok <ezkcs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipekcs.sunysb.edu>
Erez Zadok [Sun, 18 Mar 2007 23:23:52 +0000 (19:23 -0400)]
fs: Introduce path{get,put}
Export drop_pagecache_sb symbol (for branch-management).
Signed-off-by: Erez Zadok <ezkcs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipekcs.sunysb.edu>
Randy Dunlap [Mon, 19 Mar 2007 23:15:22 +0000 (19:15 -0400)]
[PATCH] Unionfs: sioq not __exit
stop_sioq() is called from both __init and __exit functions, so it
shouldn't be marked __exit.
Reported on the kernelnewbies mailing list, but no patch offered there.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sat, 17 Mar 2007 23:42:25 +0000 (19:42 -0400)]
MAINTAINERS: Unionfs URL update
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Sun, 4 Mar 2007 23:02:11 +0000 (18:02 -0500)]
fs/unionfs/: Fix unlocking in error paths
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Sun, 4 Mar 2007 20:21:14 +0000 (15:21 -0500)]
fs/unionfs/: Fix dentry leak in copyup_named_dentry
When we chmod a directory on a readonly branch, and have to copy it up, we
forget to dput(). If this was a file, it gets dput indirectly through other
functions we call, but not if it was a directory.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 2 Mar 2007 18:10:56 +0000 (13:10 -0500)]
fs/unionfs/: mntput in __cleanup_dentry
This fixes a mnt refleak which occured during copyup when directory
hierarchy was recreated on a writable branch.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Sun, 4 Mar 2007 05:41:51 +0000 (00:41 -0500)]
fs/unionfs/: Fix copyup_deleted_file dentry leak
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Fri, 2 Mar 2007 18:14:01 +0000 (13:14 -0500)]
fs/unionfs/: Miscellaneous coding style fixes
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Tue, 27 Feb 2007 19:27:25 +0000 (14:27 -0500)]
fs/unionfs/: Check return value of d_path
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sun, 25 Feb 2007 22:32:46 +0000 (17:32 -0500)]
fs/unionfs/: Use SEEK_{SET,CUR} instead of hardcoded values
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sun, 25 Feb 2007 22:30:34 +0000 (17:30 -0500)]
fs/unionfs/: Remove alloc_filldir_node
alloc_filldir_node was used only once. Additionally, all the arguments
passed to it were ignored wasting stack space for no reason whatsoever.
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sat, 24 Feb 2007 21:47:45 +0000 (16:47 -0500)]
fs/unionfs/: Rename unionfs_d_revalidate_wrap
Follow the convention of "foo" calling "__foo".
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sat, 24 Feb 2007 21:46:08 +0000 (16:46 -0500)]
fs/unionfs/: Several small cleanups in unionfs_interpose
1) No need to lock the inode - lockdep was complaining about potential
circular dependency
2) No need to use temporary variable for iunique() inode number
3) Removed unneeded comment
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Fri, 23 Feb 2007 06:04:09 +0000 (01:04 -0500)]
fs/unionfs/: Don't grab dentry private data mutex in unionfs_d_release
Grabbing the UNIONFS_D(dentry)->lock is completely unnecessary and there are
no other references; we are about to free the object anyway. Additionally,
grabbing the mutex produces warning when the slab object is reused - as it
was freed while there still was a reference to it.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 2 Mar 2007 18:35:33 +0000 (13:35 -0500)]
fs/unionfs/: Fix a memory leak in unionfs_read_super
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 2 Mar 2007 18:00:57 +0000 (13:00 -0500)]
fs/unionfs: Fix a memory leak & null pointer dereference
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Adrian Bunk [Wed, 21 Feb 2007 06:30:10 +0000 (01:30 -0500)]
[PATCH] UNION_FS must depend on SLAB
On Sat, Feb 17, 2007 at 09:51:46PM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-mm1:
>...
> git-unionfs.patch
>...
> git trees
>...
<-- snip -->
...
CC fs/unionfs/copyup.o
/home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/fs/unionfs/copyup.c: In function 'create_parents_named':
/home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/fs/unionfs/copyup.c:620: error: 'malloc_sizes' undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/fs/unionfs/copyup.c:620: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/fs/unionfs/copyup.c:620: error: for each function it appears in.)
make[3]: *** [fs/unionfs/copyup.o] Error 1
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sat, 17 Feb 2007 08:25:15 +0000 (03:25 -0500)]
fs/unionfs/: Remove unused structure members & macros
This patch removes:
- hidden_mnt pointer from struct unionfs_data
- mount_flag from struct unionfs_sb_info
- mount_flag related macros
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Michael Halcrow [Fri, 16 Feb 2007 19:09:25 +0000 (14:09 -0500)]
eCryptfs: convert lookup_one_len() to lookup_one_len_nd()
Call the new lookup_one_len_nd() rather than lookup_one_len(). This fixes an
oops when stacked on NFS.
Note that there are still some issues with eCryptfs on NFS having to do with
directory deletion (I'm not getting an oops, just an -EBUSY).
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Mon, 12 Feb 2007 17:36:38 +0000 (12:36 -0500)]
Unionfs: Documentation update
Be little gentler & updated the URLs
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Tue, 20 Feb 2007 04:35:32 +0000 (23:35 -0500)]
fs/: Move eCryptfs & Unionfs config options into a sub-menu
Using The Misc filesystems sub-menu for layered/stackable filesystems only
makes it harder for users to find eCryptfs/Unionfs.
Additionally, the menu can be easily turned into a menuconfig, which could
be used to turn on any VFS/VM functionality required by layered filesystems
(there is none at the moment).
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Josef 'Jeff' Sipek [Thu, 1 Feb 2007 17:14:03 +0000 (12:14 -0500)]
fs/unionfs/: Use __roundup_pow_of_two instead of custom rounding code
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sun, 28 Jan 2007 19:20:19 +0000 (14:20 -0500)]
fs/unionfs/: Don't duplicate the struct nameidata
The only fields that we have to watch out for are the dentry and vfsmount.
Additionally, this makes Unionfs gentler on the stack as nameidata is rather
large.
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sun, 28 Jan 2007 19:20:49 +0000 (14:20 -0500)]
fs/unionfs/: Andrew Morton's comments
- rename {,un}lock_dentry to unionfs_{,un}lock_dentry
- few minor coding style fixes
- removed prototypes from .c files
- replaced dbstart macros etc with static inlines
- replaced UNIONFS_D(d)->sem semaphore with a mutex
- renamed sioq struct workqueue to superio_workqueue
- made unionfs_get_nlinks and alloc_whname not inlined
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Adrian Bunk [Thu, 25 Jan 2007 08:15:59 +0000 (03:15 -0500)]
fs/unionfs/: possible cleanups
This patch contains the following possible cleanups:
- every function should #include the headers containing the prototypes
of it's global functions
- static functions in C files shouldn't be marked "inline", gcc should
know best when to inline them
- make needlessly global code static
- #if 0 the following unused global function:
- stale_inode.c: is_stale_inode()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
[removed stale inode related fixes as stale_inode.c is gone]
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef 'Jeff' Sipek [Sun, 28 Jan 2007 20:52:43 +0000 (15:52 -0500)]
fs/unionfs/: Remove stale_inode.c
The stale inode operations were heavily based on bad inode operations. This
patch removes stale_inode.c and converts all users of stale_inode_ops to
bad_inode_ops as there seems to be no reason to return ESTALE instead of
EIO.
This is the more appropriate than porting the bad_inode.c fix (commit
be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8) to stale_inode.c.
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 28 Jan 2007 20:11:23 +0000 (15:11 -0500)]
Unionfs: Extended Attributes support
Extended attribute support.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 28 Jan 2007 20:10:20 +0000 (15:10 -0500)]
Unionfs: Kconfig and Makefile
This patch contains the changes to fs Kconfig file, Makefiles, and Maintainers
file for Unionfs.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 21 Jan 2007 23:47:57 +0000 (18:47 -0500)]
Unionfs: Unlink
This patch provides unlink functionality for Unionfs.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 21 Jan 2007 23:47:43 +0000 (18:47 -0500)]
Unionfs: Include file
Global include file - can be included from userspace by utilities.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 28 Jan 2007 20:05:29 +0000 (15:05 -0500)]
Unionfs: Internal include file
This patch contains an internal Unionfs include file. The include file is
specific to kernel code only, and therefore is separate from
include/linux/unionfs.h.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 21 Jan 2007 23:46:56 +0000 (18:46 -0500)]
Unionfs: Helper macros/inlines
This patch contains many macros and inline functions used thoughout Unionfs.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 28 Jan 2007 20:05:07 +0000 (15:05 -0500)]
Unionfs: Handling of stale inodes
Provides nicer handling of stale inodes.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 21 Jan 2007 23:46:47 +0000 (18:46 -0500)]
Unionfs: Superblock operations
This patch contains the superblock operations for Unionfs.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 21 Jan 2007 23:46:39 +0000 (18:46 -0500)]
Unionfs: Miscellaneous helper functions
This patch contains miscellaneous helper functions used thoughout Unionfs.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Josef "Jeff" Sipek [Sun, 21 Jan 2007 23:46:11 +0000 (18:46 -0500)]
Unionfs: Privileged operations workqueue
Workqueue & helper functions used to perform privileged operations on
behalf of the user process.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>