Erez Zadok [Wed, 30 Jul 2008 01:32:36 +0000 (21:32 -0400)]
Unionfs: release 2.4
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:29:50 +0000 (00:29 -0400)]
Unionfs: use new kmem_cache_create constructor prototype
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:28:58 +0000 (00:28 -0400)]
Unionfs: LOOKUP_ACCESS intent no longer exists
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:36:13 +0000 (00:36 -0400)]
Unionfs: permission no longer takes a nameidata parameter
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:04:00 +0000 (00:04 -0400)]
Unionfs: symlink no longer takes a mode parameter
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: properly hash newly created inodes
This fixes LTP's syscalls/rename13 test.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: minor checkpatch fixes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: update copyrights
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: update maintainers
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: remove old lookup code
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: cache coherency fixes
Handle unhashed or silly-renamed lower dentries properly.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: free lower paths array when destroying dentry's private data
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: lookup overhaul using vfs_path_lookup
Rework the lookup code to use vfs_path_lookup as much as possible, to ensure
that we have a vfsmount at this critical stage. This is necessary for the
upcoming VFS API change from vfs_* to path_* methods. This change also
allows unionfs to cross bind mounts and other mounts on lower branches.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: overhaul whiteout code
Move all whiteout functions and helpers into a separate file, replace all
embedded whiteout code with calls to helpers. Cleanup and consolidate the
code. This will make it easier to replace the whiteout code with a
Linux-native whiteout implementation (once available).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: simplify stale-inode detection code
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: create and consolidate helpers to path-put lower objects
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: create and consolidate helpers to iput lower objects
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: move a rename helper closer to rename code
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: simplify the macros used to get/set the dentry start/end branches
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 28 Jul 2008 04:25:46 +0000 (00:25 -0400)]
Unionfs: use new umount_begin prototype
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 23 Apr 2008 23:41:26 +0000 (19:41 -0400)]
Unionfs: release 2.3.3
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 23 Apr 2008 23:05:59 +0000 (19:05 -0400)]
Unionfs: lock parent dentry branch config in write
Ensure that branch configuration is available to file_revalidate should a
copyup be required.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 23 Apr 2008 23:05:50 +0000 (19:05 -0400)]
Unionfs: set lower file to NULL in file_release
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 23 Apr 2008 23:05:40 +0000 (19:05 -0400)]
Unionfs: maintain one-open-file invariant for non-directories
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 23 Apr 2008 23:05:22 +0000 (19:05 -0400)]
Unionfs: reorganize file_revalidate for un/locking callers
Also clean up deep nesting/indentation.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 15 Apr 2008 17:11:04 +0000 (13:11 -0400)]
Unionfs: copyup only if file is being written to
Before, we used to copyup on an open(2) call which used flags implying
writing (O_RDWR, O_WRONLY, O_APPEND). This meant that a file being opened
for writing, then immediately closed (without actually writing to the file),
will still have been copied up. Now, we don't copyup such files in ->open,
but defer the copyup till later. [Bug #591].
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Apr 2008 19:32:26 +0000 (15:32 -0400)]
Unionfs: set append offset correctly for copied-up files
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 15 Apr 2008 17:07:44 +0000 (13:07 -0400)]
Unionfs: don't dereference dentry without lower branches in d_release
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 6 Apr 2008 01:02:23 +0000 (21:02 -0400)]
Unionfs: stop as soon as first writeable branch is found
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 3 Apr 2008 17:56:47 +0000 (13:56 -0400)]
Unionfs: lock inode around calls to notify_change()
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 3 Apr 2008 17:15:59 +0000 (13:15 -0400)]
Unionfs: copy lower times in fsync/fasync only when needed
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 15 Apr 2008 17:05:52 +0000 (13:05 -0400)]
Unionfs: prevent races in unionfs_fault
vm_ops->fault may be called in parallel. Because we have to resort to
temporarily changing the vma->vm_file to point to the lower file, a
concurrent invocation of unionfs_fault could see a different value. In this
workaround, we keep a different copy of the vma structure in our stack, so
we never expose a different value of the vma->vm_file called to us, even
temporarily. A better fix (already tested) would be to change the calling
semantics of ->fault to take an explicit file pointer.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 15 Apr 2008 19:20:03 +0000 (15:20 -0400)]
Unionfs: minor code cleanups
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 1 Apr 2008 02:32:28 +0000 (22:32 -0400)]
Unionfs: release 2.3.2
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 30 Mar 2008 21:15:08 +0000 (17:15 -0400)]
Unionfs: update lower mnts on rmdir with copyup
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 30 Mar 2008 21:11:47 +0000 (17:11 -0400)]
Unionfs: don't purge lower sb data on remount
This is no longer needed, as we don't have upper and lower pages. Plus this
was racy, requiring the unexported inode_lock variable.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 26 Mar 2008 20:25:34 +0000 (16:25 -0400)]
Unionfs: release 2.3.1
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 25 Mar 2008 21:56:12 +0000 (17:56 -0400)]
Unionfs: do not over-decrement lower superblock refs on remount
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 25 Mar 2008 00:24:52 +0000 (20:24 -0400)]
Unionfs: release 2.3
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 24 Mar 2008 21:29:42 +0000 (17:29 -0400)]
Unionfs: display mount point name along with generation number
CC: Dave Miller <justdave@mozilla.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Mar 2008 05:16:33 +0000 (01:16 -0400)]
Unionfs: document reasons for opaque directories
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Mar 2008 02:55:45 +0000 (22:55 -0400)]
Unionfs: use noinline_for_stack
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Mar 2008 01:47:35 +0000 (21:47 -0400)]
Unionfs: use __func__ instead of __FUNCTION__
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 21 Mar 2008 20:02:19 +0000 (16:02 -0400)]
Unionfs: don't copy parent inode times in setattr
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Mar 2008 02:49:29 +0000 (22:49 -0400)]
Unionfs: reduce number of whiteouts by deleting all instances of files
Optimize the unlinking of non-dir objects in unionfs by deleting all
possible lower inode objects from all writable lower branches. This may
consume a bit more processing, but on average reduces overall inode
consumption and further saves a lot by reducing the total number of
whiteouts needed. We create a whiteout now only if we could not delete all
lower objects, or if one of the lower branches was explicitly marked
read-only.
Signed-off-by: Himanshu Kanda <hkanda@cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Mar 2008 06:05:01 +0000 (02:05 -0400)]
Unionfs: lock our dentry in file operations
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 22 Mar 2008 03:37:44 +0000 (23:37 -0400)]
Unionfs: implement vm_operations->fault
As per recommendations made at LSF'08, a stackable file system which does
not change the data across layers, should try to use vm_operations instead
of address_space_operations. This means we now have to implement out own
->read and ->write methods because we cannot rely on VFS helpers which
require us to have a ->readpage method. Either way there are two caveats:
(1) It's not possible currently to set inode->i_mapping->a_ops to NULL,
because too many code paths expect i_mapping to be non-NULL.
(2) a small/dummy ->readpage is still needed because generic_file_mmap,
which we used in unionfs_mmap, still check for the existence of the
->readpage method. These code paths may have to be changed to remove the
need for readpage().
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 21 Mar 2008 20:07:59 +0000 (16:07 -0400)]
Unionfs: implement splice_read/write methods directly
Must implement splice_read/write directly, using VFS helpers, because we can
no longer rely on generic_file_splice_read/write: they need
address_space_operations implemented, which we no longer have.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 21 Mar 2008 20:04:42 +0000 (16:04 -0400)]
VFS: rename do_splice_to/from to vfs_splice_* and export symbols
A stackable file system which uses vm_ops->fault, and does not implement
address_space_operations, cannot use generic_file_splice_read/write, but has
to implement ->splice_read/write itself. These two helper functions are
very useful to such a module.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 25 Mar 2008 00:44:54 +0000 (20:44 -0400)]
VFS: export release_open_intent as GPL symbol, not regular symbol
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 16 Feb 2008 04:08:04 +0000 (23:08 -0500)]
Unionfs: release 2.2.4
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 23:42:43 +0000 (18:42 -0500)]
VFS/Unionfs: use generic path_get/path_put functions
Remove unionfs's versions thereof.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Jan Blunck [Fri, 15 Feb 2008 23:47:28 +0000 (18:47 -0500)]
Unionfs: use the new path_put
* Add path_put() functions for releasing a reference to the dentry and
vfsmount of a struct path in the right order
* Switch from path_release(nd) to path_put(&nd->path)
* Rename dput_path() to path_put_conditional()
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Andrew Morton [Fri, 15 Feb 2008 23:45:45 +0000 (18:45 -0500)]
Unionfs: embed a struct path into struct nameidata instead of nd dentrymnt
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
David Howells [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: stop using iget() and read_inode()
Replace unionfs_read_inode() with unionfs_iget(), and call that instead of
iget(). unionfs_iget() then uses iget_locked() directly and returns a
proper error code instead of an inode in the event of an error.
unionfs_fill_super() returns any error incurred when getting the root inode
instead of EINVAL.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: use dget_parent in revalidation code
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: branch management/configuration fixes
Remove unnecessary calls to update branch m/ctimes, and use them only when
needed. Update branch vfsmounts after operations that could cause a copyup.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: lock parents' branch configuration fixes
Ensure that we lock the branch configuration of parent and child dentries in
operations which need it, and in the right order.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: factor out revalidation routine
To be used by rest of revalidation code, as well a callers who already
locked the child and parent dentry branch-configurations.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: revalidation code cleanup and refactoring
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: improve debugging in copy_attr_times
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: follow_link locking fixes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: extend dentry branch configuration lock in open
Dentry branch configuration "info node" lock should extend to calls to
copy_attr_times.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: initialize path_save variable
This is not strictly necessary, but it helps quiet a gcc-4.2 warning (a good
optimizer may optimize this initialization away).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: uninline unionfs_copy_attr_times and unionfs_copy_attr_all
This reduces text size by about 6k.
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: document behavior when the lower topology changes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: ensure consistent lower inodes types
When looking up a lower object in multiple branches, especially for
directories, ignore any existing entries whose type is different than the
type of the first found object (otherwise we'll be trying to, say, call
readdir on a non-dir inode).
Signed-off-by: Himanshu Kanda <hkanda@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)]
Unionfs: grab lower super_block references
This prevents the lower super_block from being destroyed too early, when a
lower file system is being unmounted with MNT_FORCE or MNT_DETACH.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 26 Jan 2008 03:43:03 +0000 (22:43 -0500)]
Unionfs: release 2.2.3
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 25 Jan 2008 22:04:21 +0000 (17:04 -0500)]
Unionfs: lock_rename related locking fixes
CC: Mike Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 25 Jan 2008 21:04:18 +0000 (16:04 -0500)]
Unionfs: d_parent related locking fixes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 25 Jan 2008 02:57:06 +0000 (21:57 -0500)]
Unionfs: remove unnecessary call to d_iput
This old code was to fix a bug which has long since been fixed in our
copyup_permission and unionfs_d_iput.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 22 Jan 2008 10:04:18 +0000 (05:04 -0500)]
Unionfs: use first writable branch (fix/cleanup)
Cleanup code in ->create, ->symlink, and ->mknod: refactor common code into
helper functions. Also, this allows writing to multiple branches again,
which was broken by an earlier patch.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 01:38:17 +0000 (20:38 -0500)]
Unionfs: release 2.2.2
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 00:07:29 +0000 (19:07 -0500)]
Unionfs: ensure we have lower dentries in d_iput
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 9 Jan 2008 20:26:56 +0000 (15:26 -0500)]
Unionfs: branch-management related locking fixes
Add necessary locking to dentry/inode branch-configuration, so we get
consistent values during branch-management actions. In d_revalidate_chain,
->permission, and ->create, also lock parent dentry.
Erez Zadok [Wed, 9 Jan 2008 20:26:56 +0000 (15:26 -0500)]
Unionfs: mmap fixes
Ensure we have lower inodes in prepare/commit_write.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 9 Jan 2008 20:26:56 +0000 (15:26 -0500)]
Unionfs: merged several printk KERN_CONT together into one pr_debug
CC: Joe Perches <joe@perches.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 3 Jan 2008 02:57:29 +0000 (21:57 -0500)]
Unionfs: release 2.2.1
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 1 Jan 2008 21:43:39 +0000 (16:43 -0500)]
Unionfs: use VFS helpers to manipulate i_nlink
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 2 Jan 2008 02:37:39 +0000 (21:37 -0500)]
Unionfs: locking fixes
Lock parent dentries during revalidation.
Reduce total number of lockdep classes used.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 1 Jan 2008 21:27:46 +0000 (16:27 -0500)]
Unionfs: use printk KERN_CONT for debugging messages
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 28 Dec 2007 18:31:53 +0000 (13:31 -0500)]
Unionfs: release 2.2
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 28 Dec 2007 15:53:44 +0000 (10:53 -0500)]
Unionfs: don't check parent dentries
Parent dentries may not be locked and may change, so don't check them. But
do check parent inodes if they are passed to the method. Also, ensure the
checks are done only if no error occurred.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 28 Dec 2007 00:05:05 +0000 (19:05 -0500)]
Unionfs: implement d_iput method
This is needed to drop lower objects early enough, under certain conditions,
so the lower objects don't stay behind until umount(). [LTP testing]
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 28 Dec 2007 00:19:46 +0000 (19:19 -0500)]
Unionfs: don't check dentry on error
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 28 Dec 2007 00:04:09 +0000 (19:04 -0500)]
Unionfs: cleanup lower inodes after successful unlink
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Dec 2007 21:36:29 +0000 (16:36 -0500)]
Unionfs: initialize namelist variable in rename
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Dec 2007 21:30:19 +0000 (16:30 -0500)]
Unionfs: minor cleanup in check_empty
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Dec 2007 01:45:47 +0000 (20:45 -0500)]
Unionfs: update inode times after a successful open
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 23 Dec 2007 00:43:03 +0000 (19:43 -0500)]
Unionfs: set our superblock a/m/ctime granularity
Set it to 1 ns, because we could be stacked on top of file systems with such
granularity.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 28 Dec 2007 18:46:14 +0000 (13:46 -0500)]
Unionfs: handle on lower inodes in lookup
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 26 Dec 2007 05:10:37 +0000 (00:10 -0500)]
Unionfs: minor code rearrangement in rename
To avoid too much code nesting.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 28 Dec 2007 18:38:09 +0000 (13:38 -0500)]
Unionfs: implement lockdep classes
Lockdep fixes. Support locking order/classes (e.g., parent -> child ->
whiteout). Remove locking from create_parents: it's enough to just dget the
dentries in question. Move parent locking to from lookup_backend to caller,
unionfs_lookup.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 27 Dec 2007 18:35:36 +0000 (13:35 -0500)]
Unionfs: prevent false lockdep warnings in stacking
A stackable file system like unionfs often performs an operation on a lower
file system, by calling a vfs_* method, having been called possibly by the
very same method from the VFS. Both calls to the vfs_* method grab a lock
in the same lock class, and hence lockdep complains. This warning is a
false positive in instances where unionfs only calls the vfs_* method on
lower objects; there's a strict lock ordering here: upper objects first,
then lower objects.
We want to prevent these false positives so that lockdep will not shutdown
so it'd still be able to warn us about potentially true locking problems.
So, we temporarily turn off lockdep ONLY AROUND the calls to vfs methods to
which we pass lower objects, and only for those instances where lockdep
complained. While this solution may seem unclean, it is not without
precedent: other places in the kernel also do similar temporary disabling,
of course after carefully having checked that it is the right thing to do.
In the long run, lockdep needs to be taught how to handle about stacking.
Then this patch can be removed. It is likely that such lockdep-stacking
support will do essentially the same as this patch: consider the same
ordering (upper then lower) and consider upper vs. lower locks to be in
different classes.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 25 Dec 2007 20:41:08 +0000 (15:41 -0500)]
Unionfs: remove unnecessary parent lock in create
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 25 Dec 2007 20:40:23 +0000 (15:40 -0500)]
Unionfs: remove unnecessary locking in follow-link
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 21 Dec 2007 04:14:44 +0000 (23:14 -0500)]
Unionfs: remove unnecessary lock in read_inode
Our read_inode doesn't need to grab the superblock rwsem because there no
chance it could be affected by branch management. But our read_inode was
called from other places which did grab need to grab that rwsem, and lockdep
complained.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 21 Dec 2007 04:10:19 +0000 (23:10 -0500)]
Unionfs: remove unnecessary lock when deleting whiteouts
Lockdep complained, because we eventually call vfs_unlink which'd grab the
necessary locks.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 20 Dec 2007 20:22:22 +0000 (15:22 -0500)]
Unionfs: remove unnecessary conditional inode lock
This was intended to protect the inode during branch management, but that is
now done through our superblock rwsem.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>