wrapfs-5.3.y.git
18 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.

18 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.

18 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

18 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.

18 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.

18 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).

18 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.

18 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

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

18 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.

18 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

18 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.

18 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).

18 years agofsstack: 4th case to do_path_lookup
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>
18 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.

18 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

18 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.

18 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".

18 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.

18 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

18 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

18 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

18 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.

18 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.

18 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.

18 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.

18 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

18 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.

18 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

18 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

18 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

18 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

18 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

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

18 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)

18 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

18 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

18 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

18 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

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

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

18 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

18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 years agofs/unionfs/: Use SEEK_{SET,CUR} instead of hardcoded values
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>
18 years agofs/unionfs/: Remove alloc_filldir_node
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>
18 years agofs/unionfs/: Rename unionfs_d_revalidate_wrap
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>
18 years agofs/unionfs/: Several small cleanups in unionfs_interpose
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>
18 years agofs/unionfs/: Don't grab dentry private data mutex in unionfs_d_release
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>
18 years agofs/unionfs/: Fix a memory leak in unionfs_read_super
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>
18 years agofs/unionfs: Fix a memory leak & null pointer dereference
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>
18 years ago[PATCH] UNION_FS must depend on SLAB
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>
18 years agofs/unionfs/: Remove unused structure members & macros
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>
18 years agoeCryptfs: convert lookup_one_len() to lookup_one_len_nd()
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>
18 years agoUnionfs: Documentation update
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>
18 years agofs/: Move eCryptfs & Unionfs config options into a sub-menu
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>
18 years agofs/unionfs/: Use __roundup_pow_of_two instead of custom rounding code
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>
18 years agofs/unionfs/: Don't duplicate the struct nameidata
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>
18 years agofs/unionfs/: Andrew Morton's comments
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>
18 years agofs/unionfs/: possible cleanups
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>
18 years agofs/unionfs/: Remove stale_inode.c
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>
18 years agoUnionfs: Extended Attributes support
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>
18 years agoUnionfs: Kconfig and Makefile
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>
18 years agoUnionfs: Unlink
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>
18 years agoUnionfs: Include file
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>
18 years agoUnionfs: Internal include file
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>
18 years agoUnionfs: Helper macros/inlines
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>
18 years agoUnionfs: Handling of stale inodes
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>