Yiannis Pericleous [Wed, 30 May 2007 20:34:30 +0000 (16:34 -0400)]
Revert "Unionfs: Cleanup locking in new_dentry_private_data"
This reverts commit
a48f757714d7e70878461c5393de787e1497a612.
Conflicts:
fs/unionfs/lookup.c
Yiannis Pericleous [Wed, 30 May 2007 19:51:27 +0000 (15:51 -0400)]
removed super_block * from odf_get_opaque args
Yiannis Pericleous [Wed, 30 May 2007 19:45:54 +0000 (15:45 -0400)]
Documentation: replace "odfforce" with "odf_keepcache"
Yiannis Pericleous [Wed, 30 May 2007 19:43:20 +0000 (15:43 -0400)]
lookup only up to opaque branch if looking up an opaque dir
Yiannis Pericleous [Wed, 30 May 2007 18:37:10 +0000 (14:37 -0400)]
bugfix: dont move to /odf/sr if same inode number is already there
Yiannis Pericleous [Wed, 30 May 2007 17:27:10 +0000 (13:27 -0400)]
odf_remove bug, check if unionfs dentry is not negative before trying to
read its i_count
Yiannis Pericleous [Wed, 30 May 2007 17:18:25 +0000 (13:18 -0400)]
changed the format string of inode nums to filenames to %lx
Yiannis Pericleous [Wed, 30 May 2007 02:14:30 +0000 (22:14 -0400)]
split odf.h into two .h files, odf.h and odf_internals.h
Yiannis Pericleous [Wed, 30 May 2007 01:58:03 +0000 (21:58 -0400)]
renamed dentry stack functions
Yiannis Pericleous [Wed, 30 May 2007 01:54:02 +0000 (21:54 -0400)]
added comment for odf_dentry_info struct
Yiannis Pericleous [Wed, 30 May 2007 01:50:43 +0000 (21:50 -0400)]
added a few FIXME comments
Yiannis Pericleous [Wed, 30 May 2007 01:47:53 +0000 (21:47 -0400)]
lock odf inode when calling the odf fs's get_parent
Yiannis Pericleous [Wed, 30 May 2007 01:45:25 +0000 (21:45 -0400)]
use snprintf when printing help in configfs
Yiannis Pericleous [Wed, 30 May 2007 01:43:22 +0000 (21:43 -0400)]
use 2 bytes for namelen in odf cache dir dirents
Yiannis Pericleous [Wed, 30 May 2007 01:39:12 +0000 (21:39 -0400)]
changed odf options length to PAGE_SIZE
Yiannis Pericleous [Wed, 30 May 2007 01:06:38 +0000 (21:06 -0400)]
filenames in odf/sr and odf/reclaim to be in hex, not decimal
Yiannis Pericleous [Wed, 30 May 2007 01:01:32 +0000 (21:01 -0400)]
removed duplicate odf_get_opaque and odf_set_opaque functions
Yiannis Pericleous [Wed, 30 May 2007 00:47:37 +0000 (20:47 -0400)]
removed opaque_branch_id field from unionfs_sb_info
Yiannis Pericleous [Wed, 30 May 2007 00:41:43 +0000 (20:41 -0400)]
cleanup thread to clean until both blocks and inodes are below threshhold
added new cleanup flags
Yiannis Pericleous [Tue, 29 May 2007 17:54:55 +0000 (13:54 -0400)]
cleaned up partial_lookup
Yiannis Pericleous [Tue, 29 May 2007 16:43:32 +0000 (12:43 -0400)]
Documentation: updated odf.txt to say that when a dentry is released from /odf/sr it is
unlinked
Yiannis Pericleous [Tue, 29 May 2007 16:36:38 +0000 (12:36 -0400)]
modified odf_release_sr to unlink instead of renaming to /odf/reclaim
Yiannis Pericleous [Tue, 29 May 2007 16:27:25 +0000 (12:27 -0400)]
dget odf root dentry on odf_read_super
Yiannis Pericleous [Tue, 29 May 2007 16:23:25 +0000 (12:23 -0400)]
use '\0' to null terminate a string
Yiannis Pericleous [Tue, 29 May 2007 16:21:18 +0000 (12:21 -0400)]
coding-style: aligned struct decl to span over multiple lines
Yiannis Pericleous [Tue, 29 May 2007 16:14:13 +0000 (12:14 -0400)]
removed unneeded functions for allocating/freeing odf_dentry_info's
Yiannis Pericleous [Tue, 29 May 2007 04:43:59 +0000 (00:43 -0400)]
cleanup: removed unecessary check at a return value
Yiannis Pericleous [Tue, 29 May 2007 04:41:19 +0000 (00:41 -0400)]
added KERN_WARNING to cleanup thread's print messages
Yiannis Pericleous [Tue, 29 May 2007 04:39:22 +0000 (00:39 -0400)]
coding-style: removed unecesary cast
Yiannis Pericleous [Tue, 29 May 2007 04:37:35 +0000 (00:37 -0400)]
coding_style: reformatted lines over 80 chars
Yiannis Pericleous [Tue, 29 May 2007 04:35:09 +0000 (00:35 -0400)]
fixed odf_parse_options to use strdup and strsep
look for odf_keepcache instead of odfforce option
fail if dirs specified with old odf
Erez_Zadok [Tue, 29 May 2007 03:24:58 +0000 (23:24 -0400)]
invariants: don't complain if no lower dentry of a deleted dentry
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Tue, 29 May 2007 01:15:43 +0000 (21:15 -0400)]
more (forgotten) cleanups to partial_lookup.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Mon, 28 May 2007 23:47:35 +0000 (19:47 -0400)]
invariants: don't complain about directories with some NULL lower objects
Directories can have NULL lower objects in between start/end, but NOT if at
the start/end range. We cannot verify that this dentry is a type=DIR,
because it may already be a negative dentry. But if dbstart is greater than
dbend, we know that this couldn't have been a regular file: it had to have
been a directory. In that case, don't complain about NULL lower objects in
in between start/end.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Tue, 29 May 2007 00:50:52 +0000 (20:50 -0400)]
documentation: update of last modification date to odf.txt document
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Tue, 29 May 2007 00:49:51 +0000 (20:49 -0400)]
cleanup: rewrite unionfs_partial_lookup more cleanly
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Mon, 28 May 2007 23:38:14 +0000 (19:38 -0400)]
bug fix: prevent null mntget warning messages in unionfs_lookup_backend
Don't try to mntget a lower mnt at a point where the lower mnts don't yet
exist (the callers will have them later on). Instead, get the lower mnt of
the sb->s_root.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Tue, 29 May 2007 00:08:20 +0000 (20:08 -0400)]
documentation: expand comments to unionfs_lookup_backend
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Conflicts:
fs/unionfs/lookup.c
Erez_Zadok [Mon, 28 May 2007 23:23:42 +0000 (19:23 -0400)]
cleanup: remove unnecessary call to inherit_mnt
Our unionfs_lookup doesn't need to call inherit_mnt: the lower mnts will be
correct here (but not if other methods such as unionfs_rename call our
lookup_backend helper function directly).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Mon, 28 May 2007 23:21:21 +0000 (19:21 -0400)]
bug fix: don't warn if trying to mntput a "negative" union object
In unionfs_d_release, we may get negative dentries which don't have a lower
mnt. In that case, don't print a warning message from unionfs_mntput about
trying to put a NULL mnt.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Mon, 28 May 2007 23:18:45 +0000 (19:18 -0400)]
bug fix: get lower mnt from root dentry instead of lower dentry
While copying-up a file, the union object hasn't been fully formed yet, so
we don't have all the lower dentries/mnts to use (the caller will have them
later on). Therefore, we should use the sb->s_root's lower mnt here. This
fixes a "NULL mnt" warning message that came from unionfs_mntget.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Yiannis Pericleous [Mon, 28 May 2007 15:53:46 +0000 (11:53 -0400)]
coding-style: removed space before ')'
Yiannis Pericleous [Mon, 28 May 2007 15:50:18 +0000 (11:50 -0400)]
comment on why we cannot create entries in the odf (assign inode nums)
when creating the odf cached dir
Yiannis Pericleous [Mon, 28 May 2007 15:44:08 +0000 (11:44 -0400)]
one more comment on the odf_lookup code
Yiannis Pericleous [Mon, 28 May 2007 02:37:17 +0000 (22:37 -0400)]
comments for odf_lookup functions
Yiannis Pericleous [Mon, 28 May 2007 01:53:17 +0000 (21:53 -0400)]
removed ODF_LOOKUP_LINK flag and moved ODF_RMV_WH to the top of the flags
Yiannis Pericleous [Mon, 28 May 2007 01:33:54 +0000 (21:33 -0400)]
changed odf lookup flags values to hex and removed ODF_LOOKUP_LOCKED
Yiannis Pericleous [Sat, 26 May 2007 03:50:10 +0000 (23:50 -0400)]
changed unionfs_dentry_info to contain an odf_dentry_info instead of a pointer to one
Yiannis Pericleous [Sat, 26 May 2007 02:50:15 +0000 (22:50 -0400)]
modified odf_lookup functions to return a dentry instead of an
odf_dentry_info
Erez_Zadok [Sat, 26 May 2007 02:36:13 +0000 (22:36 -0400)]
Unionfs: allow users to override Makefile options in fs/unionfs/local.mk
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Yiannis Pericleous [Fri, 25 May 2007 21:29:23 +0000 (17:29 -0400)]
remove trailing ':' when building dirs= options from odf sb file
Yiannis Pericleous [Fri, 25 May 2007 21:20:54 +0000 (17:20 -0400)]
removed warning when branch_id_to_idx fails to match requested id, and added a
comment for why this can be legal in the odf
Erez_Zadok [Fri, 25 May 2007 21:01:00 +0000 (17:01 -0400)]
bug fix: catch bad use of dirs= options (extra ':' separators)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Fri, 25 May 2007 20:36:08 +0000 (16:36 -0400)]
unionfs: merge find_new_branch_index and branch_id_to_idx into one function
Useful code cleanup and consolidation between the ODF code and non-ODF code.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Conflicts:
fs/unionfs/commonfops.c
fs/unionfs/fanout.h
Yiannis Pericleous [Fri, 25 May 2007 20:25:31 +0000 (16:25 -0400)]
dont put ic dentry in odf_get_ic_dentry
Yiannis Pericleous [Fri, 25 May 2007 19:53:32 +0000 (15:53 -0400)]
modified odf_ic_cache_dentry not to use odf_lookup and to return a dentry instead of
an odf_dentry_info
Erez_Zadok [Fri, 25 May 2007 19:51:33 +0000 (15:51 -0400)]
unionfs: minor cleanup and better commenting in new_dentry_private_data
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Conflicts:
fs/unionfs/lookup.c
Erez_Zadok [Fri, 25 May 2007 19:45:30 +0000 (15:45 -0400)]
Unionfs: Cleanup locking in new_dentry_private_data
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Conflicts:
fs/unionfs/lookup.c
Erez_Zadok [Fri, 25 May 2007 19:37:38 +0000 (15:37 -0400)]
bugfix: prevent null-deref oops if lower f/s is NFS (mmap writes)
This is a workaround fora deficiency of the linux MM layer, which doesn't
allow clean coordination between upper and lower pages in stackable layers.
We prevent an oops, but the cost is that we're not able to implement
writepages cleanly, not can we call the lower file system's writepages.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Yiannis Pericleous [Fri, 25 May 2007 18:55:35 +0000 (14:55 -0400)]
changed unionfs_sb_info to contain a unionfs_sb_info instead of a pointer to one
Yiannis Pericleous [Fri, 25 May 2007 18:23:21 +0000 (14:23 -0400)]
removed the odf_sb_info field from the odf_dentry_info struct
Yiannis Pericleous [Fri, 25 May 2007 18:16:08 +0000 (14:16 -0400)]
removed the inum field from odf_dentry_info struct
Yiannis Pericleous [Fri, 25 May 2007 17:38:39 +0000 (13:38 -0400)]
changed the odf_sb_info structure to hold dentry pointers to the odf special dirs
instead of odf_dentry_info pointers
Yiannis Pericleous [Fri, 25 May 2007 16:41:48 +0000 (12:41 -0400)]
removed odf locks, added LOCK comments where we might still want to
lock something, ie when operating in odf/ic /sr and /reclaim
Yiannis Pericleous [Fri, 25 May 2007 04:02:12 +0000 (00:02 -0400)]
cleaner odf_is_new function
Yiannis Pericleous [Fri, 25 May 2007 03:59:25 +0000 (23:59 -0400)]
proper capitalization of unionfs
Yiannis Pericleous [Fri, 25 May 2007 03:57:08 +0000 (23:57 -0400)]
use sizeof() instead of strlen
Yiannis Pericleous [Fri, 25 May 2007 03:53:25 +0000 (23:53 -0400)]
print KERN_ERR is odf_read_super fails
Yiannis Pericleous [Fri, 25 May 2007 03:46:06 +0000 (23:46 -0400)]
remove the BUG_ON in odf_is_wh, for now because odf lookup is
called in odf_put_super before the whiteout file is created.
Yiannis Pericleous [Fri, 25 May 2007 03:43:23 +0000 (23:43 -0400)]
use LOOKUP_DIRECTORY instead of LOOKUP_FOLLOW
Yiannis Pericleous [Fri, 25 May 2007 03:36:21 +0000 (23:36 -0400)]
return EEXIST if a dir exists when constructing the odf hierarchy
Yiannis Pericleous [Fri, 25 May 2007 03:31:48 +0000 (23:31 -0400)]
removed unused function
Yiannis Pericleous [Fri, 25 May 2007 03:24:55 +0000 (23:24 -0400)]
added comments for odf special filenames constants and grouped them together
Yiannis Pericleous [Fri, 25 May 2007 03:10:31 +0000 (23:10 -0400)]
use only one version number for odf.
set version number to 2, since format has changed
since last release
Yiannis Pericleous [Fri, 25 May 2007 02:46:45 +0000 (22:46 -0400)]
cleanup: removed unneeded declarations
Yiannis Pericleous [Fri, 25 May 2007 02:41:47 +0000 (22:41 -0400)]
coding style: use branch_id function instead of accessing sb private
data directly
Yiannis Pericleous [Fri, 25 May 2007 02:32:59 +0000 (22:32 -0400)]
added BUG_ON to make sure dentry passed to get_parent is a dir
Yiannis Pericleous [Fri, 25 May 2007 02:18:51 +0000 (22:18 -0400)]
removed unnecessary call to unreg_configfs if init fails
Yiannis Pericleous [Fri, 25 May 2007 02:14:38 +0000 (22:14 -0400)]
coding style: align function arguments
Yiannis Pericleous [Fri, 25 May 2007 02:12:13 +0000 (22:12 -0400)]
coding style: use switch statement to avoid ugly if/else nesting
Yiannis Pericleous [Fri, 25 May 2007 02:00:31 +0000 (22:00 -0400)]
coding style: use void in a function taking no args
Erez_Zadok [Thu, 24 May 2007 04:20:42 +0000 (00:20 -0400)]
small fix: initialize 'res' to 0 to avoid gcc warning
Erez_Zadok [Thu, 24 May 2007 04:20:04 +0000 (00:20 -0400)]
cleanup: use krealloc instead of open-coding it with kmalloc/kfree/memcpy
Conflicts:
fs/unionfs/lookup.c
Erez_Zadok [Thu, 24 May 2007 01:27:58 +0000 (21:27 -0400)]
bugfix: prevent a NULL ptr deref if branch is nfs and using mmap writes
By some strange condition, the VFS can pass our unionfs_writepage a
writeback_control structure which, if passed as is to the lower ->writepage
-- here nfs_writepage, triggers a NULL ptr deref in NFS. This fix works
around this issue, and results in a successfully written mmaped file.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez_Zadok [Thu, 24 May 2007 01:26:01 +0000 (21:26 -0400)]
bugfix: handle lower file systems that do not support writeable mappings
File systems such as jffs2 (tested in 2.6.22-rc22) do not have a
->writepage. Make sure unionfs detects that conditions and returns EINVAL
when a user tries to mmap such a file with VM_WRITE.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Yiannis Pericleous [Wed, 23 May 2007 22:53:56 +0000 (18:53 -0400)]
cleanup thread to clean odf/sr as well on mount if odfforce is not set
Yiannis Pericleous [Wed, 23 May 2007 22:43:40 +0000 (18:43 -0400)]
set gid/uid to 0 in ofd_release_sr
Yiannis Pericleous [Wed, 23 May 2007 22:36:19 +0000 (18:36 -0400)]
cleanup: removed unnecesary braces
Yiannis Pericleous [Wed, 23 May 2007 22:12:11 +0000 (18:12 -0400)]
moved call of odf_release_sr from drop_inode to clear_inode
Yiannis Pericleous [Wed, 23 May 2007 14:46:07 +0000 (10:46 -0400)]
added undeclared variables to unionfs_remount
Erez Zadok [Wed, 23 May 2007 04:03:59 +0000 (00:03 -0400)]
bug fix: set lower inodes correctly after branch management succeeds
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Conflicts:
fs/unionfs/super.c
Erez Zadok [Wed, 23 May 2007 03:50:44 +0000 (23:50 -0400)]
bug fix: prevent self deadlock with remount code in pivot_root scenarios
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 23 May 2007 03:49:35 +0000 (23:49 -0400)]
debugging: test for freed (0x5a) inodes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 23 May 2007 04:01:46 +0000 (00:01 -0400)]
bugfix: statfs lower file system properly
Get the correct lower dentry to use to statfs the first branch (always), now
works with disk-based as well as network file systems. Also document the
code better.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Conflicts:
fs/unionfs/super.c
Erez_Zadok [Sun, 20 May 2007 01:11:22 +0000 (21:11 -0400)]
Add Erez Zadok to maintainers list
Erez_Zadok [Sun, 20 May 2007 01:07:29 +0000 (21:07 -0400)]
add standard copyright comment to linux/union_fs.h
Yiannis Pericleous [Tue, 22 May 2007 22:27:39 +0000 (18:27 -0400)]
readdir bug: must pass the file position at the start of the dirent to filldir
Yiannis Pericleous [Tue, 22 May 2007 22:05:05 +0000 (18:05 -0400)]
documentation: added info about /odf/sr in odf.txt
Yiannis Pericleous [Tue, 22 May 2007 21:51:30 +0000 (17:51 -0400)]
when an inode is dropped, check if it has an entry in /odf/sr and move it to /odf/reclaim
Yiannis Pericleous [Tue, 22 May 2007 20:32:40 +0000 (16:32 -0400)]
silly rename (move to /odf/sr) files to be removed that have i_count > 1