unionfs-2.6.39.y.git
13 years agoUnionfs: move debugging checks inside locks
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>
13 years agoUnionfs: fold do_readpage into unionfs_readpage
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>
13 years agoUnionfs: remove unnecessary lower atime updates
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>
13 years agoUnionfs: debugging updates
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>
13 years agoUnionfs: clear partial read in readpage
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>
13 years agoUnionfs: writepage updates
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>
13 years agoUnionfs: update cache-coherency detection heuristics
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>
13 years agoUnionfs: use i_size wrappers
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>
13 years agoUnionfs: flush and release updates
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>
13 years agoUnionfs: release 2.1.8 unionfs-2.1.8
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>
13 years agoUnionfs/VFS: no need to export 2 symbols in security/security.c
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>
13 years agoUnionfs: don't printk an error if it's due to common copyup
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>
13 years agoUnionfs: don't bother validating inode if it has no lower branches
Erez Zadok [Thu, 1 Nov 2007 04:41:03 +0000 (00:41 -0400)]
Unionfs: don't bother validating inode if it has no lower branches

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: avoid a deadlock during branch-management on a pivot_root'ed union
Erez Zadok [Fri, 2 Nov 2007 01:27:54 +0000 (21:27 -0400)]
Unionfs: avoid a deadlock during branch-management on a pivot_root'ed union

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
13 years agoUnionfs: mmap updates
Erez Zadok [Wed, 31 Oct 2007 23:04:26 +0000 (19:04 -0400)]
Unionfs: mmap updates

Rewrite unionfs_writepage to minimize dependence on AOP_WRITEPAGE_ACTIVEATE,
handle memory pressure better, and update documentation.  Remove
unionfs_sync_page because it's not needed.

CC: Hugh Dickins <hugh@veritas.com>
CC: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: update usage.txt documention
Erez Zadok [Mon, 29 Oct 2007 00:24:34 +0000 (20:24 -0400)]
Unionfs: update usage.txt documention

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: cleanup permission checking code
Erez Zadok [Fri, 2 Nov 2007 00:33:12 +0000 (20:33 -0400)]
Unionfs: cleanup permission checking code

Use vfs helpers and avoid redundant checks performed by the VFS already.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: delete whiteouts in sticky directories
Erez Zadok [Mon, 29 Oct 2007 00:24:39 +0000 (20:24 -0400)]
Unionfs: delete whiteouts in sticky directories

This is needed to maintain Unix semantics.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: release 2.1.7 unionfs-2.1.7
Erez Zadok [Fri, 19 Oct 2007 00:35:06 +0000 (20:35 -0400)]
Unionfs: release 2.1.7

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: remove obsolete #define and comment
Erez Zadok [Sun, 21 Oct 2007 20:06:42 +0000 (16:06 -0400)]
Unionfs: remove obsolete #define and comment

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: fix unionfs_setattr to handle ATTR_KILL_S*ID
Jeff Layton [Fri, 19 Oct 2007 04:44:00 +0000 (00:44 -0400)]
Unionfs: fix unionfs_setattr to handle ATTR_KILL_S*ID

Don't allow unionfs_setattr to trip the BUG() in notify_change. Clear
ATTR_MODE if the either ATTR_KILL_S*ID is set. This also allows the
lower filesystem to interpret these bits in its own way.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: remove for_writepages nfs workaround
Erez Zadok [Thu, 18 Oct 2007 21:16:51 +0000 (17:16 -0400)]
Unionfs: remove for_writepages nfs workaround

This is no longer necessary since struct writeback_control no longer has a
fs_private field which lower file systems (esp. nfs) use.  Plus, unionfs now
defines its own ->writepages method.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: convert a printk to pr_debug in release
Erez Zadok [Thu, 18 Oct 2007 18:03:16 +0000 (14:03 -0400)]
Unionfs: convert a printk to pr_debug in release

This is mostly an informational message, not an error.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: don't bother validating dentry if it has no lower branches
Erez Zadok [Wed, 17 Oct 2007 21:35:02 +0000 (17:35 -0400)]
Unionfs: don't bother validating dentry if it has no lower branches

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: don't printk trivial message upon normal rename-copyup
Erez Zadok [Wed, 17 Oct 2007 20:37:51 +0000 (16:37 -0400)]
Unionfs: don't printk trivial message upon normal rename-copyup

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: support lower filesystems without writeback capability
Erez Zadok [Tue, 16 Oct 2007 14:50:16 +0000 (10:50 -0400)]
Unionfs: support lower filesystems without writeback capability

Implement unionfs_writepages.  As per
mm/filemap.c:__filemap_fdatawrite_range(), don't call our writepage if the
lower mapping has BDI_CAP_NO_WRITEBACK capability set.

Signed-off-by: Pekka J Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: slab api remove useless ctor parameter and reorder parameters
Andrew Morton [Thu, 18 Oct 2007 19:54:55 +0000 (15:54 -0400)]
Unionfs: slab api remove useless ctor parameter and reorder parameters

fs/unionfs/super.c: In function 'unionfs_init_inode_cache':
fs/unionfs/super.c:874: warning: passing argument 5 of 'kmem_cache_create' from incompatible pointer type

Cc: Christoph Lameter <clameter@sgi.com>
Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: security convert lsm into a static interface fix
Andrew Morton [Thu, 18 Oct 2007 19:50:15 +0000 (15:50 -0400)]
Unionfs: security convert lsm into a static interface fix

ERROR: "security_inode_permission" [fs/unionfs/unionfs.ko] undefined!
ERROR: "security_file_ioctl" [fs/unionfs/unionfs.ko] undefined!

Need these back.

Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: release 2.1.6 unionfs-2.1.6
Erez Zadok [Sun, 30 Sep 2007 19:04:31 +0000 (15:04 -0400)]
Unionfs: release 2.1.6

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: coding style: avoid lines longer than 80 chars
Erez Zadok [Sun, 30 Sep 2007 17:47:14 +0000 (13:47 -0400)]
Unionfs: coding style: avoid lines longer than 80 chars

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: coding style: miscellaneous fixes
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: coding style: miscellaneous fixes

No braces around single-statement if's.
No externs in .c files.
use <linux/mman.h> not <asm/mman.h>.
Use (foo *) not (foo*).

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: coding style: avoid multiple assignments on same line
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: coding style: avoid multiple assignments on same line

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: coding style: take assignments out of "if" conditions
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: coding style: take assignments out of "if" conditions

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: coding style: proper spacing
Erez Zadok [Sun, 30 Sep 2007 17:11:16 +0000 (13:11 -0400)]
Unionfs: coding style: proper spacing

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use braces in both branches of conditionals
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: use braces in both branches of conditionals

As per CodingStyle, if one branch of an if-then-else has braces because it
has multiple statements, then the other branch should have braces too, even
if the other branch has only one statement in it.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: remove periods from the end of printk strings
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: remove periods from the end of printk strings

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: update/assign a KERN_* level to all printk statements
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: update/assign a KERN_* level to all printk statements

Also use pr_info() instead of printk(KERN_INFO ...)

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add missing newlines in printk's
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: add missing newlines in printk's

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: convert all appropriate printk's to pr_debug calls
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: convert all appropriate printk's to pr_debug calls

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use pr_debug() instead of custom dprintk()
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: use pr_debug() instead of custom dprintk()

Also turn on DEBUG if CONFIG_UNION_FS_DEBUG is on

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use page_offset() helper
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: use page_offset() helper

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: remove unnecessary if condition
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: remove unnecessary if condition

The condition is always true there.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: properly indent static struct
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: properly indent static struct

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use UNIONFS_NAME macro
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: use UNIONFS_NAME macro

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use consistent printk prefixes
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: use consistent printk prefixes

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: minor comment cleanups
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: minor comment cleanups

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: compile if debug is off
Erez Zadok [Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)]
Unionfs: compile if debug is off

Signed-of-by: John Johansen <jjohansen@suse.de>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agopatch unionfs_undo_unnecessary_unlikely_calls
Erez Zadok [Fri, 28 Sep 2007 03:55:57 +0000 (23:55 -0400)]
patch unionfs_undo_unnecessary_unlikely_calls

13 years agoUnionfs: display informational messages only if debug is on
Erez Zadok [Fri, 28 Sep 2007 03:45:46 +0000 (23:45 -0400)]
Unionfs: display informational messages only if debug is on

This is to avoid filling the console/logs with messages that are primarily
of debugging use.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Acked-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
13 years agoUnionfs: release 2.1.5 unionfs-2.1.5
Erez Zadok [Wed, 26 Sep 2007 02:39:53 +0000 (22:39 -0400)]
Unionfs: release 2.1.5

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use poison.h for safe poison pointers
Erez Zadok [Wed, 26 Sep 2007 02:14:43 +0000 (22:14 -0400)]
Unionfs: use poison.h for safe poison pointers

This also fixes a compile warning on 64-bit systems.

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on xattr ops
Erez Zadok [Tue, 25 Sep 2007 04:44:44 +0000 (00:44 -0400)]
Unionfs: add un/likely conditionals on xattr ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on unlink ops
Erez Zadok [Tue, 25 Sep 2007 04:44:44 +0000 (00:44 -0400)]
Unionfs: add un/likely conditionals on unlink ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on common subr
Erez Zadok [Mon, 24 Sep 2007 06:22:53 +0000 (02:22 -0400)]
Unionfs: add un/likely conditionals on common subr

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on readdir ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on readdir ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on rename ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on rename ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on mmap ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on mmap ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on super ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on super ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on lookup ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on lookup ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on inode ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on inode ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on fileops
Erez Zadok [Mon, 24 Sep 2007 06:21:13 +0000 (02:21 -0400)]
Unionfs: add un/likely conditionals on fileops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on headers
Erez Zadok [Mon, 24 Sep 2007 06:21:09 +0000 (02:21 -0400)]
Unionfs: add un/likely conditionals on headers

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on dir ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on dir ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on dentry ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on dentry ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on debug ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on debug ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on copyup ops
Erez Zadok [Mon, 24 Sep 2007 05:09:14 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on copyup ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add un/likely conditionals on common fileops
Erez Zadok [Mon, 24 Sep 2007 05:09:41 +0000 (01:09 -0400)]
Unionfs: add un/likely conditionals on common fileops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: lower nameidata support for nfsv4
Erez Zadok [Tue, 25 Sep 2007 04:50:48 +0000 (00:50 -0400)]
Unionfs: lower nameidata support for nfsv4

Pass nameidata structures as needed to the lower file system, support
LOOKUP_ACCESS/OPEN intents.  This makes unionfs work on top of nfsv4.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add lower nameidata debugging support
Erez Zadok [Tue, 25 Sep 2007 04:44:44 +0000 (00:44 -0400)]
Unionfs: add lower nameidata debugging support

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: minor coding style updates
Erez Zadok [Tue, 25 Sep 2007 04:44:44 +0000 (00:44 -0400)]
Unionfs: minor coding style updates

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: cast page->index loff_t before shifting
Erez Zadok [Tue, 25 Sep 2007 04:44:44 +0000 (00:44 -0400)]
Unionfs: cast page->index loff_t before shifting

Fixes bugs in number promotion/demotion computation, as per
<http://lkml.org/lkml/2007/9/20/17>

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: release 2.1.4 unionfs-2.1.4
Erez_Zadok [Thu, 20 Sep 2007 04:14:33 +0000 (00:14 -0400)]
Unionfs: release 2.1.4

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: cache-coherency fixes
Erez_Zadok [Thu, 20 Sep 2007 03:52:18 +0000 (23:52 -0400)]
Unionfs: cache-coherency fixes

Do not update mtime if there is no upper branch for the inode.  This
prevents from calling unionfs_lower_inode_idx() with a negative index, which
triggers a bug.

Signed-off-by: Olivier Blin <blino@mandriva.com>
Acked-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: display informational messages only if debug is on
Erez_Zadok [Thu, 20 Sep 2007 04:59:05 +0000 (00:59 -0400)]
Unionfs: display informational messages only if debug is on

This is to avoid filling the console/logs with messages that are primarily
of debugging use.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use int in unionfs_d_revalidate
Erez_Zadok [Thu, 20 Sep 2007 01:18:35 +0000 (21:18 -0400)]
Unionfs: use int in unionfs_d_revalidate

We have to use an int, even though unionfs_d_revalidate calls other routines
that return only true/false, b/c ->d_revalidate is allowed to return a
negative errno number.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: documentation updates/corrections
Erez_Zadok [Thu, 20 Sep 2007 01:12:37 +0000 (21:12 -0400)]
Unionfs: documentation updates/corrections

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: release 2.1.3 unionfs-2.1.3
Erez_Zadok [Tue, 11 Sep 2007 03:38:02 +0000 (23:38 -0400)]
Unionfs: release 2.1.3

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: cache coherency after lower objects are removed
Erez_Zadok [Tue, 11 Sep 2007 00:19:29 +0000 (20:19 -0400)]
Unionfs: cache coherency after lower objects are removed

Prevent an oops if a lower file is deleted and then it is stat'ed from the
upper layer.  Ensure that we return a negative dentry so the user will get
an ENOENT.  Properly dput/mntput so we don't leak references at the lower
file system.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: unionfs_lookup locking consistency
Erez_Zadok [Tue, 11 Sep 2007 00:15:37 +0000 (20:15 -0400)]
Unionfs: unionfs_lookup locking consistency

Ensure that our lookup locking is consistent and symmetric: if a lock
existed before calling lookup_backend, it should remain so; only if
performing a lookup of a known new dentry, should lookup_backend return a
newly-locked dentry-inode info (and only if there was no error).  Document
this behavior.  This cleanup allowed us to remove two unnecessary int
declarations.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use boolean type in unionfs_d_revalidate
Erez_Zadok [Tue, 11 Sep 2007 00:10:31 +0000 (20:10 -0400)]
Unionfs: use boolean type in unionfs_d_revalidate

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: add missing newlines to printks
Erez_Zadok [Tue, 11 Sep 2007 00:09:41 +0000 (20:09 -0400)]
Unionfs: add missing newlines to printks

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: remove unnecessary comment
Erez_Zadok [Thu, 6 Sep 2007 04:41:59 +0000 (00:41 -0400)]
Unionfs: remove unnecessary comment

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: documentation updates
Erez_Zadok [Thu, 6 Sep 2007 04:40:02 +0000 (00:40 -0400)]
Unionfs: documentation updates

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: use bool type in dentry and file revalidation code
Erez_Zadok [Thu, 6 Sep 2007 04:35:12 +0000 (00:35 -0400)]
Unionfs: use bool type in dentry and file revalidation code

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: cache-coherency fix for is_newer_lower
Erez_Zadok [Thu, 6 Sep 2007 04:42:56 +0000 (00:42 -0400)]
Unionfs: cache-coherency fix for is_newer_lower

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: import Jeff's fixes from korg
Erez_Zadok [Thu, 6 Sep 2007 02:18:44 +0000 (22:18 -0400)]
Unionfs: import Jeff's fixes from korg

64 bit fixes for debugging support.
Use bool type where appropriate.
Minor code cleanups.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
13 years agoUnionfs: Remove unused #defines
Josef 'Jeff' Sipek [Mon, 3 Sep 2007 21:32:07 +0000 (17:32 -0400)]
Unionfs: Remove unused #defines

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
13 years agoUnionfs: Simplify unionfs_get_nlinks
Josef 'Jeff' Sipek [Mon, 3 Sep 2007 21:22:45 +0000 (17:22 -0400)]
Unionfs: Simplify unionfs_get_nlinks

Since we set the right value for d_type in readdir, there's really no point
in having to calculate the number of directory links. Some on-disk
filesystems don't even store the number of links for directories.

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
13 years agoUnionfs: unionfs_create rewrite
Josef 'Jeff' Sipek [Fri, 31 Aug 2007 23:31:58 +0000 (19:31 -0400)]
Unionfs: unionfs_create rewrite

The code was hard to follow and violated some invariants (e.g., never modify
a read only branch, and always create on branch 0).

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
13 years agoUnionfs: document lockdep issues
Erez_Zadok [Fri, 31 Aug 2007 15:24:06 +0000 (11:24 -0400)]
Unionfs: document lockdep issues

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: support CONFIG_PREEMPT_RT
Erez_Zadok [Fri, 24 Aug 2007 14:42:56 +0000 (10:42 -0400)]
Unionfs: support CONFIG_PREEMPT_RT

Use compat_rw_semaphore when using the real-time preemption patches.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: release 2.1.2 unionfs-2.1.2
Erez_Zadok [Wed, 22 Aug 2007 22:08:48 +0000 (18:08 -0400)]
Unionfs: release 2.1.2

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: imported fixes from korg branch's take-3 series
Erez_Zadok [Wed, 22 Aug 2007 20:49:09 +0000 (16:49 -0400)]
Unionfs: imported fixes from korg branch's take-3 series

- removed EACCES/EROFS text from issues.txt
- updated sioq.[hc] copyright dates to 2006 (not earlier)
- added small XXX comment to xattr copyup code (selinux CAP_FOWNER stuff) to
  say that entire copyup code should be moved to SIOQ.
- copyup_xattr: renamed name_list_orig -> name_list_buf
- multi-line static inline unionfs_xattr_kfree
- rewrote unionfs_interpose a bit cleaner (no backward goto's, better
  variable names, use small util fxn, etc.)
- introduced CONFIG_UNION_FS_DEBUG instead of hand-editing makefile
- unionfs_mntget/put cleanups
- bug fix to is_robranch_idx (thanks to Patrick Aussems).  Fixed bug #571.
- fixed a couple of important bugs in our init/release_lower_nd

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: release 2.1.1. unionfs-2.1.1
Erez_Zadok [Sun, 19 Aug 2007 19:54:06 +0000 (15:54 -0400)]
Unionfs: release 2.1.1.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: minor usage.txt documentation fix
Erez_Zadok [Sun, 19 Aug 2007 19:22:43 +0000 (15:22 -0400)]
Unionfs: minor usage.txt documentation fix

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: imported fixes from korg branch
Erez_Zadok [Sat, 18 Aug 2007 20:02:02 +0000 (16:02 -0400)]
Unionfs: imported fixes from korg branch

Export release_open_intent.
SElinux: xattr fixes (CAP_FOWNER).
unionfs_xattr_kfree inline function.
alloc_lower_nd -> init_lower_nd.
free_lower_nd -> release_lower_nd.
unionfs_purge_extras -> unionfs_postcopyup_release.
unionfs_inherit_mnt -> unionfs_postcopyup_setmnt.
minor code/copyright cleanups.
MS_SILENT remount fix.
simplify unionfs_mntget/put.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: back-port stuff from Jeff's korg branch to per-kernel branches
Erez_Zadok [Sat, 11 Aug 2007 18:01:08 +0000 (14:01 -0400)]
Unionfs: back-port stuff from Jeff's korg branch to per-kernel branches

Just a bunch of code cleanups: no functionality changed.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
13 years agoRevert "bugfix: add MODULE_LICENSE to mtdsuper module so it loads"
Erez_Zadok [Sat, 11 Aug 2007 02:21:05 +0000 (22:21 -0400)]
Revert "bugfix: add MODULE_LICENSE to mtdsuper module so it loads"

This reverts commit 924185024a661a3a0fb772fde4ce178e587ed018.

13 years agoUnionfs/eCryptfs: remove lookup_one_len_nd and LOOKUP_ONE code
Erez_Zadok [Thu, 9 Aug 2007 21:04:19 +0000 (17:04 -0400)]
Unionfs/eCryptfs: remove lookup_one_len_nd and LOOKUP_ONE code

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
13 years agoUnionfs: support incremental versions
Erez_Zadok [Tue, 7 Aug 2007 22:51:20 +0000 (18:51 -0400)]
Unionfs: support incremental versions

Also: release Unionfs 2.1 (since code has gotten much more stable since 2.0)

Unionfs will now report its precise version number and the kernel it was
meant for, upon module loading.  This is useful for maintenance purposes:
users can report the precise release number of Unionfs, and it also helps
prevent running older versions when newer ones are intended, or mixing
versions among supported kernels.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>