An error occurred fetching the project authors.
- 14 Apr, 2015 1 commit
-
-
Al Viro authored
commit 946e51f2 upstream. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> [bwh: Backported to 3.2: - Apply name changes in all the different places we use d_alias and d_child - Move the WARN_ON() in __d_free() to d_free() as we don't have dentry_free()] Signed-off-by:
Ben Hutchings <ben@decadent.org.uk> [lizf: Backported to 3.4: - adjust context - need one more name change in debugfs]
-
- 02 Feb, 2012 1 commit
-
-
Alex Elder authored
Lockdep was reporting a possible circular lock dependency in dentry_lease_is_valid(). That function needs to sample the session's s_cap_gen and and s_cap_ttl fields coherently, but needs to do so while holding a dentry lock. The s_cap_lock field was being used to protect the two fields, but that can't be taken while holding a lock on a dentry within the session. In most cases, the s_cap_gen and s_cap_ttl fields only get operated on separately. But in three cases they need to be updated together. Implement a new lock to protect the spots updating both fields atomically is required. Signed-off-by:
Alex Elder <elder@dreamhost.com> Reviewed-by:
Sage Weil <sage@newdream.net>
-
- 12 Jan, 2012 1 commit
-
-
Sage Weil authored
Enable/disable use of the dentry dir 'complete' flag via a mount option. This lets the admin control whether ceph uses the dcache to satisfy negative lookups or readdir when it has the entire directory contents in its cache. This is purely a performance optimization; correctness is guaranteed whether it is enabled or not. Reviewed-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 10 Jan, 2012 2 commits
-
-
Sage Weil authored
ceph_mdsc_put_request() can call iput(), which can sleep. Don't do that. Fixes: #1812 Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
We now set d_fsdata unconditionally on all dentries prior to setting up the d_ops, so all of these checks are unnecessary. Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 04 Jan, 2012 4 commits
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
vfs_create() ignores everything outside of 16bit subset of its mode argument; switching it to umode_t is obviously equivalent and it's the only caller of the method Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
vfs_mkdir() gets int, but immediately drops everything that might not fit into umode_t and that's the only caller of ->mkdir()... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 29 Dec, 2011 1 commit
-
-
Sage Weil authored
Ceph attempts to use the dcache to satisfy negative lookups and readdir when the entire directory contents are in cache. Disable this behavior until lingering bugs in this code are shaken out; we'll re-enable these hooks once things are fully stable. Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 07 Dec, 2011 1 commit
-
-
Sage Weil authored
We have been using i_lock to protect all kinds of data structures in the ceph_inode_info struct, including lists of inodes that we need to iterate over while avoiding races with inode destruction. That requires grabbing a reference to the inode with the list lock protected, but igrab() now takes i_lock to check the inode flags. Changing the list lock ordering would be a painful process. However, using a ceph-specific i_ceph_lock in the ceph inode instead of i_lock is a simple mechanical change and avoids the ordering constraints imposed by igrab(). Reported-by:
Amon Ott <a.ott@m-privacy.de> Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 11 Nov, 2011 1 commit
-
-
Sage Weil authored
Set up d_fsdata on the root dentry. This fixes a NULL pointer dereference in ceph_d_prune on umount. It also means we can eventually strip out all of the conditional checks on d_fsdata because it is now set unconditionally (prior to setting up the d_ops). Fix the ceph_d_prune debug print while we're here. Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 06 Nov, 2011 1 commit
-
-
Sage Weil authored
We used to use a flag on the directory inode to track whether the dcache contents for a directory were a complete cached copy. Switch to a dentry flag CEPH_D_COMPLETE that is safely updated by ->d_prune(). Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 03 Nov, 2011 1 commit
-
-
Sage Weil authored
When the VFS prunes a dentry from the cache, clear the D_COMPLETE flag on the parent dentry. Do this for the live and snapshotted namespaces. Do not bother for the .snap dir contents, since we do not cache that. Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 26 Jul, 2011 8 commits
-
-
Sage Weil authored
For the most part we don't care about racing with rename when directing MDS requests; either the old or new parent is fine. Document that, and do some minor cleanup. Reviewed-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
We carry a pin on the parent directory for the rename source and dest dentries. For the source it's r_locked_dir; we need to explicitly reference the old_dentry parent as well, since the dentry's d_parent may change between when the request was created and pinned and when it is freed. Reviewed-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
Have caller pass in a safely-obtained reference to the parent directory for calculating a dentry's hash valud. While we're here, simpify the flow through ceph_encode_fh() so that there is a single exit point and cleanup. Also fix a bug with the dentry hash calculation: calculate the hash for the dentry we were given, not its parent. Reviewed-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
Protect d_parent with d_lock. Carry a reference. Simplify the flow so that there is a single exit point and cleanup. Reviewed-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
d_parent is protected by d_lock: use it when looking up a dentry's parent directory inode. Also take a reference and drop it in the caller to avoid a use-after-free. Reported-by:
Al Viro <viro@ZenIV.linux.org.uk> Reviewed-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
The ->lookup() and prepopulate_readdir() callers are working with unhashed dentries, so we don't have to worry. The export.c callers, though, need to initialize something they got back from d_obtain_alias() and are potentially racing with other callers. Make sure we don't return unless the dentry is properly initialized (by us or someone else). Reported-by:
Al Viro <viro@ZenIV.linux.org.uk> Reviewed-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
We weren't properly calling lookup_instantiate_filp when setting up the lookup intent, which could lead to file leakage on errors. So: - use separate helper for the hidden snapdir translation, immediately following the mds request - use ceph_finish_lookup for the final dentry/return value dance in the exit path - lookup_instantiate_filp on success Reported-by:
Al Viro <viro@ZenIV.linux.org.uk> Reviewed-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
This saves us a word of memory per file. Reviewed-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 21 Jul, 2011 3 commits
-
-
Josef Bacik authored
Btrfs needs to be able to control how filemap_write_and_wait_range() is called in fsync to make it less of a painful operation, so push down taking i_mutex and the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some file systems can drop taking the i_mutex altogether it seems, like ext3 and ocfs2. For correctness sake I just pushed everything down in all cases to make sure that we keep the current behavior the same for everybody, and then each individual fs maintainer can make up their mind about what to do from there. Thanks, Acked-by:
Jan Kara <jack@suse.cz> Signed-off-by:
Josef Bacik <josef@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Josef Bacik authored
This converts everybody to handle SEEK_HOLE/SEEK_DATA properly. In some cases we just return -EINVAL, in others we do the normal generic thing, and in others we're simply making sure that the properly due-dilligence is done. For example in NFS/CIFS we need to make sure the file size is update properly for the SEEK_HOLE and SEEK_DATA case, but since it calls the generic llseek stuff itself that is all we have to do. Thanks, Signed-off-by:
Josef Bacik <josef@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 20 Jul, 2011 1 commit
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 08 Jun, 2011 1 commit
-
-
Sage Weil authored
We should use ihold whenever we already have a stable inode ref, even when we aren't holding i_lock. This avoids adding new and unnecessary locking dependencies. Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 26 May, 2011 3 commits
-
-
Sage Weil authored
Ceph does not need these, and they screw up our use of the dcache as a consistent cache. Signed-off-by:
Sage Weil <sage@newdream.net> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Sage Weil authored
Only a few file systems need this. Start by pushing it down into each rename method (except gfs2 and xfs) so that it can be dealt with on a per-fs basis. Acked-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Sage Weil <sage@newdream.net> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Sage Weil authored
Only a few file systems need this. Start by pushing it down into each fs rmdir method (except gfs2 and xfs) so it can be dealt with on a per-fs basis. This does not change behavior for any in-tree file systems. Acked-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Sage Weil <sage@newdream.net> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 19 May, 2011 2 commits
-
-
Sage Weil authored
Both off and fi->offset are unsigned, so the difference is always >= 0. Compare them directly instead of the sign of the difference. Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
We allocate a buffer for rstats if the dirstat option is enabled. Use snprintf. Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 21 Mar, 2011 2 commits
-
-
Sage Weil authored
Just for consistency's sake. Fix obsolete comment too. Signed-off-by:
Sage Weil <sage@newdream.net>
-
Yehuda Sadeh authored
The ino32 mount option forces the ceph fs to report 32 bit ino values. This is useful for 64 bit kernels with 32 bit userspace. Signed-off-by:
Yehuda Sadeh <yehuda@hq.newdream.net>
-
- 10 Mar, 2011 1 commit
-
-
Al Viro authored
can't blindly check nd->flags in ->d_revalidate() Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 04 Mar, 2011 1 commit
-
-
Sage Weil authored
Otherwise you can do things like # mkdir .snap/foo # cd .snap/foo/.snap # ls <badness> Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 03 Mar, 2011 3 commits
-
-
Sage Weil authored
First, this was racy anyway: d_release isn't called until well after the dentry is unhashed. Second, this runs afoul of the recent dcache change that clears d_parent prior to calling d_release (949854d0), causing a NULL pointer dereference. Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
Do not set the I_COMPLETE flag on directories until we resolve races with dcache pruning. Signed-off-by:
Sage Weil <sage@newdream.net>
-
Sage Weil authored
This reverts commit 97d79b40. This fails to account for d_parent changes due to rename or disconnected dentries due to submounts or NFS reexports. Signed-off-by:
Sage Weil <sage@newdream.net>
-
- 20 Feb, 2011 1 commit
-
-
Yehuda Sadeh authored
When creating a new dentry we now hold a reference to the parent inode in the ceph_dentry. This is required due to the new RCU changes from 949854d0, which set dentry->d_parent to NULL in d_kill before calling the ->release() callback. If/when that behavior is changed, we can revert this hack. Signed-off-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Sage Weil <sage@newdream.net>
-