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>
Erez Zadok [Fri, 21 Dec 2007 04:08:13 +0000 (23:08 -0500)]
Unionfs: prevent deadlock in cache coherency
Don't try to truncate_inode_pages in in purge_inode_data, because this could
lead to a deadlock between some of address_space ops and dentry
revalidation: the address space op is invoked with a lock on our own page,
and truncate_inode_pages will block on locked pages. Instead, it should be
enough to be gentler and just invalidate_mapping_pages.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 25 Dec 2007 04:07:20 +0000 (23:07 -0500)]
Unionfs: remove custom read/write methods
Having them results in lockdep warnings about having locks and grabbing the
same class locks in do_sync_read/write which were called from
unionfs_read/write. All they did was revalidate out file object sooner,
which will now be deferred till a bit later. Instead, use generic
do_sync_read and do_sync_write.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Hugh Dickins [Fri, 28 Dec 2007 18:41:39 +0000 (13:41 -0500)]
Unionfs: restructure unionfs_setattr and fix truncation order
Restructure the code to move the lower notify_change out of the loop in
unionfs_setattr. Cleanup and simplify the code. Then fix the truncation
order which fsx-linux in a unionfs on tmpfs found. Then handle copyup
properly.
When shrinking a file, unionfs_setattr needs to vmtruncate the upper level
before notifying change to the lower level, to eliminate those dirty pages
beyond new eof which otherwise drift down to the lower level's writepage,
writing beyond its eof (and later uncovered when the file is expanded).
Also truncate the upper level first when expanding, in the case when
the upper level's s_maxbytes is more limiting than the lower level's.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Hugh Dickins [Tue, 25 Dec 2007 20:31:13 +0000 (15:31 -0500)]
Unionfs: mmap fixes
Remove !mapping_cap_writeback_dirty shortcircuit from unionfs_writepages.
It was introduced to avoid the stray AOP_WRITEPAGE_ACTIVATE coming from
shmem_writepage; but that has since been fixed in shmem_writepage and in
write_cache_pages. It stayed because it looked like a good optimization,
not to waste time calling down to tmpfs when that would serve no purpose.
But in fact this optimization causes hangs when running LTP with unionfs
over tmpfs. The problem is that the test comes at the wrong level: unionfs
has already declared in its default_backing_dev_info that it's playing by
cap_writeback_dirty rules. If it does nothing here in its writepages, its
dirty pages accumulate and choke the system. What's needed is to carry on
down and let its pages be cleaned while in turn they dirty the lower level.
And this now has an additional benefit for tmpfs, that a sync or pdflush
pushes these pages down to shmem_writepage, letting it match the filepage
coming from unionfs with the swap which may have been allocated earlier,
so it can free the duplication sooner than waiting for further pressure.
Remove unnecessary locking/code from prepare_write. Handle if no lower
inodes in writepage.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 19 Dec 2007 00:14:46 +0000 (19:14 -0500)]
Unionfs: release special files on copyup
If we copyup a special file (char, block, etc.), then dput the source
object.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 18 Dec 2007 23:57:24 +0000 (18:57 -0500)]
Unionfs: create new symlinks only in first branch
When creating a new symlink, always create it in the first branch, which is
always writeable, not in the branch which may have a whiteout in it. This
makes the policy for the creation of new symlinks consistent with that of
new files/directories, as well as improves efficiency a bit.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 18 Dec 2007 23:56:55 +0000 (18:56 -0500)]
Unionfs: create new special files only in first branch
When creating a new special file, always create it in the first branch,
which is always writeable, not in the branch which may have a whiteout in
it. This makes the policy for the creation of new special files consistent
with that of new files/directories, as well as improves efficiency a bit.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 18 Dec 2007 06:06:30 +0000 (01:06 -0500)]
Unionfs: initialize inode times for reused inodes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 21 Dec 2007 03:40:38 +0000 (22:40 -0500)]
Unionfs: interpose cleanup and fix for spliced dentries
Fix unionfs_interpose to fill lower inode info when d_splice_alias returns
NULL. Also cleanup impossible case (d_splice_alias doesn't return ERR_PTR).
Signed-off-by: Rachita Kothiyal <rachita@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 28 Dec 2007 19:08:11 +0000 (14:08 -0500)]
Unionfs: clarify usage.txt read/write behavior
CC: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 21 Dec 2007 05:27:47 +0000 (00:27 -0500)]
Unionfs: use locking around i_size_write in 32-bit systems
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 13 Dec 2007 22:11:30 +0000 (17:11 -0500)]
Unionfs: clarify usage.txt mount options
CC: Jim Kissel <jlk@osml.eu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 12 Dec 2007 17:31:26 +0000 (12:31 -0500)]
Unionfs: avoid using drop_pagecache_sb in remount
Exporting drop_pagecache_sb to modules is somewhat risky because one cannot
sleep inside invalidate_mapping_pages. This could cause a lot of latency in
the pre-emption code. So don't export this symbol to minimize the risk that
others will use it.
Instead, unionfs will try to directly invalidate as many pages it can from
the unionfs_remount code. Invalidating those inode pages is not strictly
required, but helpful in encouraging a revalidation of inodes sooner than
waiting for individual f/s ops to access the union. Since a remount is
already an expensive but rare operation, this inode pages invalidation
shouldn't add too much overhead.
CC: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 8 Dec 2007 18:47:57 +0000 (13:47 -0500)]
Unionfs: release 2.1.11
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 8 Dec 2007 00:44:02 +0000 (19:44 -0500)]
Unionfs: reduce the amount of cache-coherency debugging messages
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 7 Dec 2007 21:09:24 +0000 (16:09 -0500)]
Unionfs: cleanup/consolidate branch-mode parsing code
Also a bug fix: disallow unrecognized branch modes at mount time, instead of
defaulting to "rw".
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 27 Nov 2007 00:11:38 +0000 (19:11 -0500)]
Unionfs: call wait_on_page_writeback before clear_page_dirty_for_io
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 26 Nov 2007 03:40:07 +0000 (22:40 -0500)]
Unionfs: release 2.1.10
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 18:35:54 +0000 (13:35 -0500)]
Unionfs: use generic_file_aio_read/write
There's no apparent need to define our own aio_read/write methods.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 18:34:04 +0000 (13:34 -0500)]
Unionfs: update our inode size correctly upon partial write
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 19:51:56 +0000 (14:51 -0500)]
Unionfs: prevent multiple writers to lower_page
Without this patch, the LTP fs test "rwtest04" triggers a
BUG_ON(PageWriteback(page)) in fs/buffer.c:1706.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 01:05:47 +0000 (20:05 -0500)]
Unionfs: support splice(2)
Also remove redundant variable from unionfs_readpage (saves a bit on stack
space).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 24 Nov 2007 21:43:36 +0000 (16:43 -0500)]
Unionfs: reintroduce a bmap method
This is needed for swapon(2) files in the union.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 24 Nov 2007 21:03:14 +0000 (16:03 -0500)]
Unionfs: update times in setattr
Needed to maintain Unix semantics via utimes(2).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 26 Nov 2007 04:01:28 +0000 (23:01 -0500)]
Unionfs: create opaque directories' whiteouts unconditionally
Needed to maintain Unix semantics (LTP testing).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 20:48:40 +0000 (15:48 -0500)]
Unionfs: don't create whiteouts on rightmost branch
If we are unlinking/rmdir'ing an object on the rightmost branch, there's no
need to create a whiteout there: this saves on storage space and inodes.
Also, in the (degenerate) case of having only one branch, this really saves
on whiteouts.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 20:47:57 +0000 (15:47 -0500)]
Unionfs: release lower resources on successful rmdir
This patch prevents those resources from lingering around until memory
pressure would have forced them out. The patch also properly handles
directories that have been rmdir'ed which are still some process's cwd.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 24 Nov 2007 07:55:21 +0000 (02:55 -0500)]
Unionfs: remove useless debugging messages
These are considered normal behaviour, they don't really reveal any insight
to the person debugging the code, and they tend to clutter console messages.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 21 Nov 2007 03:29:20 +0000 (22:29 -0500)]
Unionfs: handle whiteouts more efficiently in filldir
If we cache a dirent for file "foo", and then it gets deleted, then we look
for a ".wh.foo" whiteout entry in the same dirent cache. But our dirent
cache strips the ".wh." prefix, thus looking for an entry named "foo" whose
filldir_node->whiteout should be 1 instead of 0. In that case, don't
display an incorrect printk message that the file system may be corrupt,
but set that filldir_node->whiteout to 1.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 21 Nov 2007 03:23:08 +0000 (22:23 -0500)]
Unionfs: set lower mnt after mkdir which resulted in copyup
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 24 Nov 2007 07:09:28 +0000 (02:09 -0500)]
Unionfs: minor cleanup in the debugging infrastructure
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 19 Nov 2007 01:46:16 +0000 (20:46 -0500)]
Unionfs: minor coding standards applied
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Hugh Dickins [Mon, 19 Nov 2007 01:26:05 +0000 (20:26 -0500)]
Unionfs: minor cleanup in writepage
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 19 Nov 2007 01:23:08 +0000 (20:23 -0500)]
Unionfs: use f_path instead of f_dentry/mnt
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 22 Nov 2007 02:55:53 +0000 (21:55 -0500)]
Unionfs: cleaner support for RT patches
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 13 Nov 2007 03:55:22 +0000 (22:55 -0500)]
Unionfs: release 2.1.9
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 12 Nov 2007 00:40:49 +0000 (19:40 -0500)]
Unionfs: move debugging checks inside locks
This is to ensure that the objects we want to check aren't being destroyed
or changed by another thread.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 13 Nov 2007 01:36:20 +0000 (20:36 -0500)]
Unionfs: fold do_readpage into unionfs_readpage
Simplify the code and reduce stack pressure a bit.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 11 Nov 2007 23:34:34 +0000 (18:34 -0500)]
Unionfs: remove unnecessary lower atime updates
No need for this because our readpage calls vfs_read on the lower objects,
which would update the atime as/if needed.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 13 Nov 2007 01:35:58 +0000 (20:35 -0500)]
Unionfs: debugging updates
Don't perform dentry+inode checks unless both are valid.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 9 Nov 2007 15:27:32 +0000 (10:27 -0500)]
Unionfs: clear partial read in readpage
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 13 Nov 2007 01:34:28 +0000 (20:34 -0500)]
Unionfs: writepage updates
Don't set/reset the PageUptodate flag on our page. Call flush_dcache_page
on the lower page after copy_highpage, and set it uptodate. Call
set_page_dirty right before clear_page_dirty_for_io.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 11 Nov 2007 01:20:58 +0000 (20:20 -0500)]
Unionfs: update cache-coherency detection heuristics
Use a small delay to reduce the number of times unionfs has to detect
changed mtime's/ctime's, and also reduce the potential for false positives.
See Documentation/filesystems/unionfs/concepts.txt for a detailed
discussion.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 10 Nov 2007 21:01:38 +0000 (16:01 -0500)]
Unionfs: use i_size wrappers
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 11 Nov 2007 03:01:16 +0000 (22:01 -0500)]
Unionfs: flush and release updates
Remove the totalopens counter which was intended to reduce unnecessary
processing of d_deleted dentries. Move that processing from file_release to
flush.
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 2 Nov 2007 23:45:30 +0000 (19:45 -0400)]
Unionfs: release 2.1.8
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 2 Nov 2007 23:56:49 +0000 (19:56 -0400)]
Unionfs/VFS: no need to export 2 symbols in security/security.c
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 1 Nov 2007 05:38:09 +0000 (01:38 -0400)]
Unionfs: don't printk an error if it's due to common copyup
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>