unionfs-2.6.39.y.git
13 years agoAdd Erez Zadok to maintainers list
Erez_Zadok [Sun, 20 May 2007 01:11:22 +0000 (21:11 -0400)]
Add Erez Zadok to maintainers list

13 years agoadd standard copyright comment to linux/union_fs.h
Erez_Zadok [Sun, 20 May 2007 01:07:29 +0000 (21:07 -0400)]
add standard copyright comment to linux/union_fs.h

13 years agod_splice bugfix: update dentry in our lookup if needed.
Erez_Zadok [Sun, 20 May 2007 00:44:25 +0000 (20:44 -0400)]
d_splice bugfix: update dentry in our lookup if needed.

13 years agommap: file revalidation and fanout invariant validation
Erez_Zadok [Sat, 19 May 2007 23:59:13 +0000 (19:59 -0400)]
mmap: file revalidation and fanout invariant validation

Added the newer checks to file revalidation and fanout invariants to the
newly merged mmap code.  Also minor mmap related comments added.

13 years agommap: sync_page bug, call sync_page on lower page, not unionfs page
Yiannis Pericleous [Sat, 19 May 2007 19:23:22 +0000 (15:23 -0400)]
mmap: sync_page bug, call sync_page on lower page, not unionfs page

13 years agommap: also revalidate file passed to unionfs_release
Erez_Zadok [Sat, 19 May 2007 23:17:30 +0000 (19:17 -0400)]
mmap: also revalidate file passed to unionfs_release

Conflicts:

fs/unionfs/commonfops.c

13 years agommap: update atime upon successful file reading (via mmap or otherwise)
Erez_Zadok [Sun, 6 May 2007 00:41:46 +0000 (20:41 -0400)]
mmap: update atime upon successful file reading (via mmap or otherwise)

13 years agommap: proper locking to interoperate with branch-management code
Erez_Zadok [Sat, 5 May 2007 23:27:33 +0000 (19:27 -0400)]
mmap: proper locking to interoperate with branch-management code

Include proper read un/lock calls as in file.c.  Make unionfs_do_readpage
static as no one else should call this helper function.

13 years agommap: remove unnecessary unionfs_bmap method
Erez_Zadok [Sat, 5 May 2007 23:15:28 +0000 (19:15 -0400)]
mmap: remove unnecessary unionfs_bmap method

Unionfs is not a block-based file system, so it should not define ->bmap.

13 years agommap: trivial sendfile support
Erez_Zadok [Sat, 5 May 2007 23:10:00 +0000 (19:10 -0400)]
mmap: trivial sendfile support

13 years agommap: minor code and comment reformatting
Erez_Zadok [Sat, 19 May 2007 23:10:42 +0000 (19:10 -0400)]
mmap: minor code and comment reformatting

Conflicts:

fs/unionfs/file.c

13 years agommap: #if 0 unneeded code instead of commenting it out
Yiannis Pericleous [Tue, 1 May 2007 23:11:53 +0000 (19:11 -0400)]
mmap: #if 0 unneeded code instead of commenting it out

13 years agommap: read upper file instead of lower file
Yiannis Pericleous [Tue, 1 May 2007 19:18:39 +0000 (15:18 -0400)]
mmap: read upper file instead of lower file

dont touch atimes on reads

13 years agommap: coding style: reformated a line longer than 80 chars
Yiannis Pericleous [Sun, 29 Apr 2007 02:04:54 +0000 (22:04 -0400)]
mmap: coding style: reformated a line longer than 80 chars

13 years agommap: remove defunct comments
Erez_Zadok [Sun, 29 Apr 2007 01:04:05 +0000 (21:04 -0400)]
mmap: remove defunct comments

13 years agommap: file revalidation
Yiannis Pericleous [Fri, 27 Apr 2007 22:13:29 +0000 (18:13 -0400)]
mmap: file revalidation

13 years agommap: applied main mmap patch
Erez_Zadok [Sat, 19 May 2007 23:00:51 +0000 (19:00 -0400)]
mmap: applied main mmap patch

Resolved the following conflicts:

Conflicts:

fs/unionfs/Makefile
fs/unionfs/file.c

13 years agobugfix: fixed interpose to check if d_splice_alias returns a dentry
Erez_Zadok [Sat, 19 May 2007 22:22:53 +0000 (18:22 -0400)]
bugfix: fixed interpose to check if d_splice_alias returns a dentry

Also in unionfs_interpose, ensure that this new dentry's private data is
correct.  unionfs_interpose now returns a dentry if d_splice_alias has
returned a dentry.  (This is a reimplementation of the same fix from the ODF
code base.)

13 years agodebug: remove unnecessarily verbose debugging printk's
Erez_Zadok [Sat, 19 May 2007 21:14:27 +0000 (17:14 -0400)]
debug: remove unnecessarily verbose debugging printk's

13 years agocleanup: consistent printk messages
Erez_Zadok [Sat, 19 May 2007 20:40:16 +0000 (16:40 -0400)]
cleanup: consistent printk messages

13 years agocleanup: eliminate wrapper function create_parents
Erez Zadok [Fri, 18 May 2007 07:41:05 +0000 (03:41 -0400)]
cleanup: eliminate wrapper function create_parents

Eliminate simple wrapper function create_parents which trivially called
create_parents_named with one more arg derived from the caller.  Instead,
remove the wrapper, rename create_parents_named to create_parents, and make
everyone call create_parents directly.  This clarifies the code a bit more
and saves a bit on stack space.

13 years agocleanup: eliminate wrapper function copyup_dentry
Erez Zadok [Fri, 18 May 2007 07:27:02 +0000 (03:27 -0400)]
cleanup: eliminate wrapper function copyup_dentry

Eliminate simple wrapper function copyup_dentry which trivially called
copyup_named_dentry with 2 more args derived from the caller.  Instead,
remove the wrapper, rename copyup_named_dentry to copyup_dentry, and make
everyone call copyup_dentry directly.  This clarifies the code a bit more
and saves a bit on stack space.

13 years agocleanup: rewrite do_delayed_copyup more cleanly and clearly
Erez Zadok [Fri, 18 May 2007 07:07:37 +0000 (03:07 -0400)]
cleanup: rewrite do_delayed_copyup more cleanly and clearly

13 years agodebugging: small fix to Makefile to correct #define typo
Erez Zadok [Fri, 18 May 2007 06:18:44 +0000 (02:18 -0400)]
debugging: small fix to Makefile to correct #define typo

13 years agocleanup: remove unnecessary macro used in only one place
Erez Zadok [Fri, 18 May 2007 05:56:08 +0000 (01:56 -0400)]
cleanup: remove unnecessary macro used in only one place

Remove the UNIONFS_TMPNAM_LEN macro and just use the actual length of the
string file name in question, which is more efficient (and correct).

13 years agobug fix: don't revalidate dropped dentries
Erez Zadok [Fri, 18 May 2007 05:53:12 +0000 (01:53 -0400)]
bug fix: don't revalidate dropped dentries

This fixes a harmless but annoying message that unionfs prints if a dropped
dentry is being revalidated, which could happen if you unlink open files.

13 years agobug fix: retry lookup for different silly-renamed files
Erez Zadok [Fri, 18 May 2007 05:45:18 +0000 (01:45 -0400)]
bug fix: retry lookup for different silly-renamed files

When we have to copyup an open-but-unlinked file, we have to give it a
temporary name, similar to NFS's silly-renamed files.  So we generate
temporary file names until we find one that doesn't exist, and use it.  The
code had a bug where if the silly-renamed file name already existed, Unionfs
would oops upon copyup to that temp name.

13 years agoDocumentation: better comments for copyup-related code
Erez Zadok [Fri, 18 May 2007 05:41:04 +0000 (01:41 -0400)]
Documentation: better comments for copyup-related code

13 years agoVerify and maintain fanout invariants.
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.

13 years agoPost-copyup helper functions
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.

13 years agoIntroduce compile-time debugging support to Unionfs
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).

13 years agobugfixes: correctly decrement refcounts of mnt's upon branch management
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.

13 years agobugfix in BUG_ON use: actually catch bad use of unionfs_mntput
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

13 years agocleanup: removed a trailing whitespace
Yiannis Pericleous [Sun, 29 Apr 2007 02:06:46 +0000 (22:06 -0400)]
cleanup: removed a trailing whitespace

13 years agobugfix: remove defunct unionfs_put_inode method
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.

13 years agooptimize branch overlapping test a bit
Erez_Zadok [Fri, 4 May 2007 18:44:02 +0000 (14:44 -0400)]
optimize branch overlapping test a bit

13 years agoDocumentation update regarding overlapping branches and new lookup code.
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.

13 years agobranch management: disallow setting leftmost branch to readonly
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).

13 years agoRevert "Unionfs: Check remount options for being NULL"
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.

13 years agobugfix: don't leak resources when copyup fails partially
Erez_Zadok [Thu, 19 Apr 2007 22:40:36 +0000 (18:40 -0400)]
bugfix: don't leak resources when copyup fails partially

13 years agocleanup: call our unionfs_{unlock,lock}_dentry instead of mutex ops.
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.

13 years agocleanup: rename our "do_rename" to __unionfs_rename.
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".

13 years agocleanup: rename prefix our version of double_lock_dentry with "unionfs_"
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.

13 years agoCleanup: ensure space between every comma-delimited function argument list
Erez_Zadok [Fri, 13 Apr 2007 22:33:41 +0000 (18:33 -0400)]
Cleanup: ensure space between every comma-delimited function argument list

13 years agocleanup: rewrite long while(1) loop more cleanly
Erez_Zadok [Wed, 28 Mar 2007 16:42:37 +0000 (12:42 -0400)]
cleanup: rewrite long while(1) loop more cleanly

13 years agoMove one function off of branchman.c and remove source file.
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

13 years agocleanup: consistent pointer declaration spacing.
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.

13 years agoMerge unionfs_write with __unionfs_write.
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.

13 years agocleanup: fix one odd indentation and long line breakup.
Erez Zadok [Sun, 25 Mar 2007 05:12:48 +0000 (01:12 -0400)]
cleanup: fix one odd indentation and long line breakup.

13 years agoCommenting the code.
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.

13 years agocleanup: prefix external functions with 'extern' properly
Erez Zadok [Sun, 25 Mar 2007 03:14:03 +0000 (23:14 -0400)]
cleanup: prefix external functions with 'extern' properly

13 years agocleanup: one more trailing whitespace removed.
Erez_Zadok [Sun, 25 Mar 2007 03:01:13 +0000 (23:01 -0400)]
cleanup: one more trailing whitespace removed.

13 years agocleanup: spell check all strings and comments
Erez_Zadok [Sun, 25 Mar 2007 00:06:44 +0000 (20:06 -0400)]
cleanup: spell check all strings and comments

13 years agocleanup: use consistent style for multi-line comments
Erez_Zadok [Sat, 24 Mar 2007 23:56:56 +0000 (19:56 -0400)]
cleanup: use consistent style for multi-line comments

13 years agocleanup: keep all top-of-function automatic variables clustered together
Erez_Zadok [Sat, 24 Mar 2007 23:41:58 +0000 (19:41 -0400)]
cleanup: keep all top-of-function automatic variables clustered together

13 years agocoding-style: remove one more {braces} around one-statement code block
Erez_Zadok [Sat, 24 Mar 2007 23:32:42 +0000 (19:32 -0400)]
coding-style: remove one more {braces} around one-statement code block

13 years agocleanup: remove unnecessary blank lines in short code blocks
Erez_Zadok [Sat, 24 Mar 2007 23:31:28 +0000 (19:31 -0400)]
cleanup: remove unnecessary blank lines in short code blocks

13 years agocleanup: add missing copyright notices
Erez_Zadok [Sat, 24 Mar 2007 23:21:51 +0000 (19:21 -0400)]
cleanup: add missing copyright notices

13 years agocoding-style: reformat lines longer than 80 chars (accounting for TABs)
Erez_Zadok [Sat, 24 Mar 2007 23:14:18 +0000 (19:14 -0400)]
coding-style: reformat lines longer than 80 chars (accounting for TABs)

13 years agocleanup: every printk should prefix with "unionfs: " consistently
Erez_Zadok [Sat, 24 Mar 2007 22:36:59 +0000 (18:36 -0400)]
cleanup: every printk should prefix with "unionfs: " consistently

13 years agocoding-style: remove unnecessary {braces} around one-line code blocks
Erez_Zadok [Sat, 24 Mar 2007 22:19:49 +0000 (18:19 -0400)]
coding-style: remove unnecessary {braces} around one-line code blocks

13 years agocoding-style: no lines over 80 chars
Erez_Zadok [Sat, 24 Mar 2007 22:11:10 +0000 (18:11 -0400)]
coding-style: no lines over 80 chars

13 years agocoding-style: indent every line properly
Erez_Zadok [Sat, 24 Mar 2007 21:57:56 +0000 (17:57 -0400)]
coding-style: indent every line properly

13 years agocleanup: remove trailing spaces
Erez_Zadok [Sat, 24 Mar 2007 21:41:57 +0000 (17:41 -0400)]
cleanup: remove trailing spaces

13 years agoDocumentation: fix spelling error
Erez_Zadok [Sat, 24 Mar 2007 20:28:59 +0000 (16:28 -0400)]
Documentation: fix spelling error

13 years agoDocumentation: minor typo fixed in incgen remount option
Erez_Zadok [Sat, 24 Mar 2007 20:19:40 +0000 (16:19 -0400)]
Documentation: minor typo fixed in incgen remount option

13 years agoUnionfs: SLAB_CTOR_CONSTRUCTOR has been removed from vanilla
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>
13 years ago[PATCH] unionfs: fix slab abuses with krealloc
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>
13 years ago[PATCH] fix unionfs compilation
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>
13 years agoUnionfs: Check remount options for being NULL
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>
13 years agoUnionfs: Accept MS_SILENT during remount
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>
13 years agoUnionfs: Don't inline do_remount_{add,del,mode}_option
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>
13 years agoUnionfs: Added several BUG_ONs to assert dentry validity
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>
13 years agoUnionfs: Properly handle stale inodes passed to unionfs_permission
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>
13 years agoUnionfs: Pass lowernd to lower ->revalidate function
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>
13 years agoUnionfs: vfsmount reference counting fixes
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>
13 years agoUnionfs: unionfs_create needs to revalidate the dentry
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>
13 years agoUnionfs: Decrement totalopens counter on error in unionfs_open
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>
13 years agoUnionfs: Document unionfs_d_release locking
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>
13 years agoUnionfs: Remove the older incgen ioctl
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>
13 years agoUnionfs: Grab the unionfs sb private data lock around branch info users
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>
13 years agoUnionfs: Rewrite unionfs_d_revalidate
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>
13 years agoUnionfs: Introduce unionfs_mnt{get,put}
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>
13 years agoUnionfs: Bulk of branch-management remount code
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>
13 years agoUnionfs: Introduce branch-id code
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>
13 years agoUnionfs: Actually verify if dentry's info node is locked
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>
13 years agoUnionfs: Provide more helpful info on branch leaks during unmount
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>
13 years agoUnionfs: Rename unionfs_data sbcount field to more appropriate open_files
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>
13 years agoUnionfs: Proper comment on rwsem field
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>
13 years agoUnionfs: Documentation updates for branch-management
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>
13 years agofs: Export drop_pagecache_sb symbol
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>
13 years agofs: Introduce path{get,put}
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>
13 years ago[PATCH] Unionfs: sioq not __exit
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>
13 years agoMAINTAINERS: Unionfs URL update
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>
13 years agofs/unionfs/: Fix unlocking in error paths
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>
13 years agofs/unionfs/: Fix dentry leak in copyup_named_dentry
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>
13 years agofs/unionfs/: mntput in __cleanup_dentry
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>
13 years agofs/unionfs/: Fix copyup_deleted_file dentry leak
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>
13 years agofs/unionfs/: Miscellaneous coding style fixes
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>
13 years agofs/unionfs/: Check return value of d_path
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>