summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | ceph: drop src address(es) from message header [new protocol feature]Sage Weil2010-05-173-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CEPH_FEATURE_NOSRCADDR protocol feature avoids putting the full source address in each message header (twice). This patch switches the client to the new scheme, and _requires_ this feature on the server. The server will support both the old and new schemes. That means an old client will work with a new server, but a new client will not work with an old server. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: cleanup: remove unused assignementDan Carpenter2010-05-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't ever use "dirty" so we can remove it. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: clean up cap release loop vs spinlockSage Weil2010-05-171-4/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: name bdi ceph-%d instead of major:minorSage Weil2010-05-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bdi_setup_and_register() helper doesn't help us since we bdi_init() in create_client() and bdi_register() only when sget() succeeds. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: skip mds sync on forced unmountSage Weil2010-05-171-0/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: adjust masked struct_v variable namesSage Weil2010-05-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Reported-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: clean up mount options, ->show_options()Sage Weil2010-05-172-40/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure all options are included in /proc/mounts. Some cleanup. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: set dn offset when splicedSage Weil2010-05-172-40/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to assign an offset when the dentry goes from null to linked, which is always done by splice_dentry(). Notably, we should NOT assign an offset when a dentry is first created and is still null. BUG if we try to splice a non-null dentry (we shouldn't). Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: don't clobber i_max_offset on already complete dirSage Weil2010-05-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can screw up offsets assigned to new dentries and break dcache readdir results. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: skip set_dentry_offset work if directory not I_COMPLETESage Weil2010-05-171-0/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: set next_offset on readdir finishSage Weil2010-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set next_offset to 2 (always 2!), not 0, on readdir finish. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: listxattr should compare version by >=Henry C Chang2010-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the version hasn't changed, don't rebuild the index. Signed-off-by: Henry C Chang <henry_c_chang@tcloudcomputing.com> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: fix xattr dangling pointer / double freeSage Weil2010-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we use the xattr_blob, clear the pointer so we don't release the memory at the bottom of the fuction. Reported-by: Henry C Chang <henry_c_chang@tcloudcomputing.com> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: close messenger raceSage Weil2010-05-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify messenger locking, and close race between ceph_con_close() setting the CLOSED bit and con_work() checking the bit, then taking the mutex. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: name msgpools; useful error messagesSage Weil2010-05-173-7/+16
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: fix memory leak due to possible dentry init raceSage Weil2010-05-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Free dentry_info in error path. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: include auth method in error messagesSage Weil2010-05-174-4/+9
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: osdtimeout=0 for now timeoutSage Weil2010-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the osd reset timeout to be disabled. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: d_obtain_alias() returns ERR_PTR()Dan Carpenter2010-05-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d_obtain_alias() doesn't return NULL, it returns an ERR_PTR(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: wake up mount thread when getting osdmapYehuda Sadeh2010-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the mount thread waits for the osdmap, it needs to be awaken. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
| * | | | ceph: remove unused #includesHuang Weiyi2010-05-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused #include's in fs/ceph/super.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: wait for both monmap and osdmap when opening sessionSage Weil2010-05-171-5/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
| * | | | ceph: clean up connection resetSage Weil2010-05-172-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reset out_keepalive_pending and peer_global_seq, and drop unused var. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: simplify ceph_msg_newSage Weil2010-05-177-36/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only need to pass in front_len. Callers can attach any other payload pieces (middle, data) as they see fit. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: make ceph_msg_new return NULL on failure; clean up, fix callersSage Weil2010-05-177-80/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning ERR_PTR(-ENOMEM) is useless extra work. Return NULL on failure instead, and fix up the callers (about half of which were wrong anyway). Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: rewrite msgpool using mempool_tSage Weil2010-05-172-151/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't need to maintain large pools of messages, we can just use the standard mempool_t. We maintain a msgpool 'wrapper' because we need the mempool_t* in the alloc function, and mempool gives us only pool_data. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: use ceph_sb_to_client instead of ceph_clientCheng Renquan2010-05-1711-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ceph_sb_to_client and ceph_client are really identical, we need to dump one; while function ceph_client is confusing with "struct ceph_client", ceph_sb_to_client's definition is more clear; so we'd better switch all call to ceph_sb_to_client. -static inline struct ceph_client *ceph_client(struct super_block *sb) -{ - return sb->s_fs_info; -} Signed-off-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: handle kzalloc() failureCheng Renquan2010-05-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: drop unnecessary msgpool for mon_client subscribe_ackSage Weil2010-05-172-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preallocate a single message to reuse instead. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: drop unnecessary msgpool for mon_client auth_replySage Weil2010-05-172-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preallocate a single reply message that we can reuse instead. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: clean up statfsSage Weil2010-05-172-57/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid unnecessary msgpool. Preallocate reply. Fix use-after-free race. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: fix theoretically possible double-put on connectionSage Weil2010-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This would only trigger if we bailed out before resetting r_con_filling_msg because the server reply was corrupt (oversized). Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: cleanup: remove dead codeDan Carpenter2010-05-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "xattr" is never NULL here. We took care of that in the previous if statement block. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: reduce build_path debug outputSage Weil2010-05-171-6/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: use __page_cache_alloc and add_to_page_cache_lruYehuda Sadeh2010-05-175-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following Nick Piggin patches in btrfs, pagecache pages should be allocated with __page_cache_alloc, so they obey pagecache memory policies. Also, using add_to_page_cache_lru instead of using a private pagevec where applicable. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: update for removal of kref_setStephen Rothwell2010-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: simplify page setup for incoming dataSage Weil2010-05-171-44/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop largely useless helper __prepare_pages(), and simplify sanity checks. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: invalidate affected dentry leases on aborted requestsSage Weil2010-05-174-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we abort a request, we return to caller, but the request may still complete. And if we hold the dir FILE_EXCL bit, we may not release a lease when sending a request. A simple un-tar, control-c, un-tar again will reproduce the bug (manifested as a 'Cannot open: File exists'). Ensure we invalidate affected dentry leases (as well dir I_COMPLETE) so we don't have valid (but incorrect) leases. Do the same, consistently, at other sites where I_COMPLETE is similarly cleared. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: fix race between aborted requests and fill_traceSage Weil2010-05-172-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we abort requests we need to prevent fill_trace et al from doing anything that relies on locks held by the VFS caller. This fixes a race between the reply handler and the abort code, ensuring that continue holding the dir mutex until the reply handler completes. Signed-off-by: Sage Weil <sage@newdream.net>
| * | | | ceph: clean up mds reply, error handlingSage Weil2010-05-172-58/+55
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would occasionally BUG out in the reply handler because r_reply was nonzero, due to a race with ceph_mdsc_do_request temporarily setting r_reply to an ERR_PTR value. This is unnecessary, messy, and also wrong in the EIO case. Clean up by consistently using r_err for errors and r_reply for messages. Also fix the abort logic to trigger consistently for all errors that return to the caller early (e.g., EIO from timeout case). If an abort races with a reply, use the result from the reply. Also fix locking for r_err, r_reply update in the reply handler. Signed-off-by: Sage Weil <sage@newdream.net>
* | | | Merge branch 'for-linus' of ↵Linus Torvalds2010-05-21105-1170/+849
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (69 commits) fix handling of offsets in cris eeprom.c, get rid of fake on-stack files get rid of home-grown mutex in cris eeprom.c switch ecryptfs_write() to struct inode *, kill on-stack fake files switch ecryptfs_get_locked_page() to struct inode * simplify access to ecryptfs inodes in ->readpage() and friends AFS: Don't put struct file on the stack Ban ecryptfs over ecryptfs logfs: replace inode uid,gid,mode initialization with helper function ufs: replace inode uid,gid,mode initialization with helper function udf: replace inode uid,gid,mode init with helper ubifs: replace inode uid,gid,mode initialization with helper function sysv: replace inode uid,gid,mode initialization with helper function reiserfs: replace inode uid,gid,mode initialization with helper function ramfs: replace inode uid,gid,mode initialization with helper function omfs: replace inode uid,gid,mode initialization with helper function bfs: replace inode uid,gid,mode initialization with helper function ocfs2: replace inode uid,gid,mode initialization with helper function nilfs2: replace inode uid,gid,mode initialization with helper function minix: replace inode uid,gid,mode init with helper ext4: replace inode uid,gid,mode init with helper ... Trivial conflict in fs/fs-writeback.c (mark bitfields unsigned)
| * | | | switch ecryptfs_write() to struct inode *, kill on-stack fake filesAl Viro2010-05-213-45/+11
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | | switch ecryptfs_get_locked_page() to struct inode *Al Viro2010-05-213-15/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | | simplify access to ecryptfs inodes in ->readpage() and friendsAl Viro2010-05-211-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we can get to them from page->mapping->host, no need to mess with file. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | | AFS: Don't put struct file on the stackAl Viro2010-05-214-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't put struct file on the stack as it takes up quite a lot of space and violates lifetime rules for struct file. Rather than calling afs_readpage() indirectly from the directory routines by way of read_mapping_page(), split afs_readpage() to have afs_page_filler() that's given a key instead of a file and call read_cache_page(), specifying the new function directly. Use it in afs_readpages() as well. Also make use of this in afs_mntpt_check_symlink() too for the same reason. Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David Howells <dhowells@redhat.com>
| * | | | Ban ecryptfs over ecryptfsAl Viro2010-05-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a seriously simplified patch from Eric Sandeen; copy of rationale follows: === mounting stacked ecryptfs on ecryptfs has been shown to lead to bugs in testing. For crypto info in xattr, there is no mechanism for handling this at all, and for normal file headers, we run into other trouble: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: [<ffffffffa015b0b3>] ecryptfs_d_revalidate+0x43/0xa0 [ecryptfs] ... There doesn't seem to be any good usecase for this, so I'd suggest just disallowing the configuration. Based on a patch originally, I believe, from Mike Halcrow. === Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | | logfs: replace inode uid,gid,mode initialization with helper functionAl Viro2010-05-211-8/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | | ufs: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov2010-05-211-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | | udf: replace inode uid,gid,mode init with helperDmitry Monakhov2010-05-212-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | | ubifs: replace inode uid,gid,mode initialization with helper functionDmitry Monakhov2010-05-211-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
OpenPOWER on IntegriCloud