aboutsummaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2010-05-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds27-1245/+1228
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (23 commits) cifs: fix noserverino handling when unix extensions are enabled cifs: don't update uniqueid in cifs_fattr_to_inode cifs: always revalidate hardlinked inodes when using noserverino [CIFS] drop quota operation stubs cifs: propagate cifs_new_fileinfo() error back to the caller cifs: add comments explaining cifs_new_fileinfo behavior cifs: remove unused parameter from cifs_posix_open_inode_helper() [CIFS] Remove unused cifs_oplock_cachep cifs: have decode_negTokenInit set flags in server struct cifs: break negotiate protocol calls out of cifs_setup_session cifs: eliminate "first_time" parm to CIFS_SessSetup [CIFS] Fix lease break for writes cifs: save the dialect chosen by server cifs: change && to || cifs: rename "extended_security" to "global_secflags" cifs: move tcon find/create into separate function cifs: move SMB session creation code into separate function cifs: track local_nls in volume info [CIFS] Allow null nd (as nfs server uses) on create [CIFS] Fix losing locks during fork() ...
2010-05-18Merge branch 'next' into for-linusJames Morris2-15/+0
2010-05-17ceph: all allocation functions should get gfp_maskYehuda Sadeh8-30/+32
This is essential, as for the rados block device we'll need to run in different contexts that would need flags that are other than GFP_NOFS. Signed-off-by: Yehuda Sadeh <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: specify max_bytes on readdir repliesSage Weil4-1/+14
Specify max bytes in request to bound size of reply. Add associated mount option with default value of 512 KB. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: cleanup pool op stringsSage Weil1-19/+12
Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: Use kzallocJulia Lawall1-2/+1
Use kzalloc rather than the combination of kmalloc and memset. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,size,flags; statement S; @@ -x = kmalloc(size,flags); +x = kzalloc(size,flags); if (x == NULL) S -memset(x, 0, size); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: use common helper for aborted dir request invalidationSage Weil3-31/+27
We invalidate I_COMPLETE and dentry leases in two places: on aborted mds request and on request replay. Use common helper to avoid duplicate code. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: cope with out of order (unsafe after safe) mds replySage Weil1-0/+6
Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: save peer feature bits in connection structureSage Weil2-0/+2
These are used for adjusting behavior, such as conditionally encoding a newer message format. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: resync headers with userlandSage Weil6-22/+91
Notable changes include pool op defines and types, FLOCK feature bit, and new CMPXATTR osd ops. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: use ceph. prefix for virtual xattrsSage Weil1-10/+11
Drop the 'user.' prefix and use just 'ceph.' for fs virtual xattrs. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: throw out dirty caps metadata, data on session teardownSage Weil1-3/+41
The remove_session_caps() helper is called when an MDS closes out our session (either normally, or as a result of a failed reconnect), and when we tear down state for umount. If we remove the last cap, and there are no cap migrations in progress, then there is little hope of us flushing out that data to the mds (without heroic efforts to reconnect and flush). So, to avoid leaving inodes pinned (due to dirty state) and crashing after umount, throw out dirty caps state and unpin the inodes. Print a warning to the console so we know something was lost. NOTE: Although we drop wrbuffer refs, we don't actually mark pages clean; maybe a truncate should be queued? Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: attempt mds reconnect if mds closes our sessionSage Weil1-2/+3
Currently, if our session is closed (due to a timeout, or explicit close, or whatever), we just sit there doing nothing unless/until the MDS restarts, at which point we try to reconnect. Change client to attempt an immediate reconnect if our session is closed. Note that currently the MDS doesn't support this, and our attempt will fail. We'll get a session CLOSE, our caps and dirty cap state will be dropped, and the client will be free to attempt to reconnect. That's clearly not as nice as a successful reconnect, but it at least allows us to try to carry on, and in the future the MDS will support a reconnect and we will fare better. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: clean up send_mds_reconnect interfaceSage Weil1-31/+16
Pass a ceph_mds_session, since the caller has it. Remove the dead code for sending empty reconnects. It used to be used when the MDS contacted _us_ to solicit a reconnect, and we could reply saying "go away, I have no session." Now we only send reconnects based on the mds map, and only when we do in fact have an open session. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: wait for mds OPEN reply to indicate reconnect successSage Weil1-15/+13
We used to infer reconnect success by watching the MDS state, essentially assuming that hearing nothing meant things were ok. That wasn't particularly reliable. Instead, the MDS replies with an explicit OPEN message to indicate success. Strictly speaking, this is a protocol change, but it is a backwards compatible one that does not break new clients + old servers or old clients + new servers. At least not yet. Drop unused @all argument from kick_requests while we're at it. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: only send cap releases when mds is OPEN|HUNGSage Weil1-1/+3
On OPENING we shouldn't have any caps (or releases). On CLOSING, we should wait until we succeed (and throw it all out), or don't (and are OPEN again). On RECONNECTING we can wait until we are OPEN. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: dicard cap releases on mds restartSage Weil1-0/+41
If the MDS restarts, the expire caps state is no longer shared, and can be thrown out. Caps state will be rebuilt on the MDS during the reconnect process that follows. Zero out any release messages and adjust the release counter accordingly. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: make mon client statfs handling more genericYehuda Sadeh3-52/+58
This is being done so that we could reuse the statfs infrastructure with other requests that return values. Signed-off-by: Yehuda Sadeh <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: drop src address(es) from message header [new protocol feature]Sage Weil3-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 <[email protected]>
2010-05-17ceph: cleanup: remove unused assignementDan Carpenter1-2/+1
We don't ever use "dirty" so we can remove it. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: clean up cap release loop vs spinlockSage Weil1-4/+3
Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: name bdi ceph-%d instead of major:minorSage Weil1-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 <[email protected]>
2010-05-17ceph: skip mds sync on forced unmountSage Weil1-0/+3
Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: adjust masked struct_v variable namesSage Weil1-9/+9
Reported-by: Bill Pemberton <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: clean up mount options, ->show_options()Sage Weil2-40/+69
Ensure all options are included in /proc/mounts. Some cleanup. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: set dn offset when splicedSage Weil2-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 <[email protected]>
2010-05-17ceph: don't clobber i_max_offset on already complete dirSage Weil1-1/+2
This can screw up offsets assigned to new dentries and break dcache readdir results. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: skip set_dentry_offset work if directory not I_COMPLETESage Weil1-0/+4
Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: set next_offset on readdir finishSage Weil1-1/+1
Set next_offset to 2 (always 2!), not 0, on readdir finish. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: listxattr should compare version by >=Henry C Chang1-1/+1
If the version hasn't changed, don't rebuild the index. Signed-off-by: Henry C Chang <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: fix xattr dangling pointer / double freeSage Weil1-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 <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: close messenger raceSage Weil1-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 <[email protected]>
2010-05-17ceph: name msgpools; useful error messagesSage Weil3-7/+16
Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: fix memory leak due to possible dentry init raceSage Weil1-1/+4
Free dentry_info in error path. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: include auth method in error messagesSage Weil4-4/+9
Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: osdtimeout=0 for now timeoutSage Weil1-1/+1
Allow the osd reset timeout to be disabled. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: d_obtain_alias() returns ERR_PTR()Dan Carpenter1-6/+6
d_obtain_alias() doesn't return NULL, it returns an ERR_PTR(). Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: wake up mount thread when getting osdmapYehuda Sadeh1-0/+1
Now that the mount thread waits for the osdmap, it needs to be awaken. Signed-off-by: Yehuda Sadeh <[email protected]>
2010-05-17ceph: remove unused #includesHuang Weiyi1-3/+0
Remove unused #include's in fs/ceph/super.c Signed-off-by: Huang Weiyi <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: wait for both monmap and osdmap when opening sessionSage Weil1-5/+6
Signed-off-by: Yehuda Sadeh <[email protected]>
2010-05-17ceph: clean up connection resetSage Weil2-1/+2
Reset out_keepalive_pending and peer_global_seq, and drop unused var. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: simplify ceph_msg_newSage Weil7-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 <[email protected]>
2010-05-17ceph: make ceph_msg_new return NULL on failure; clean up, fix callersSage Weil7-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 <[email protected]>
2010-05-17ceph: rewrite msgpool using mempool_tSage Weil2-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 <[email protected]>
2010-05-17ceph: use ceph_sb_to_client instead of ceph_clientCheng Renquan11-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 <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: handle kzalloc() failureCheng Renquan1-0/+4
Signed-off-by: Cheng Renquan <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: drop unnecessary msgpool for mon_client subscribe_ackSage Weil2-13/+13
Preallocate a single message to reuse instead. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: drop unnecessary msgpool for mon_client auth_replySage Weil2-10/+14
Preallocate a single reply message that we can reuse instead. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: clean up statfsSage Weil2-57/+97
Avoid unnecessary msgpool. Preallocate reply. Fix use-after-free race. Signed-off-by: Sage Weil <[email protected]>
2010-05-17ceph: fix theoretically possible double-put on connectionSage Weil1-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 <[email protected]>