aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-08-10ceph: generalize mon requests, add pool op supportYehuda Sadeh2-17/+158
Generalize the current statfs synchronous requests, and support pool_ops. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-05ceph: only queue async writeback on cap revocation if there is dirty dataSage Weil1-1/+1
Normally, if the Fb cap bit is being revoked, we queue an async writeback. If there is no dirty data but we still hold the cap, this leaves the client sitting around doing nothing until the cap timeouts expire and the cap is released on its own (as it would have been without the revocation). Instead, only queue writeback if the bit is actually used (i.e., we have dirty data). If not, we can reply to the revocation immediately. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-03ceph: do not ignore osd_idle_ttl mount optionSage Weil1-0/+3
Actually apply the mount option to the mount_args struct. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-03ceph: constify dentry_operationsSage Weil2-5/+5
This makes checkpatch happy. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-03ceph: whitespace cleanupSage Weil7-24/+31
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: add flock/fcntl lock supportGreg Farnum5-2/+284
Implement flock inode operation to support advisory file locking. All lock/unlock operations are synchronous with the MDS. Lock state is sent when reconnecting to a recovering MDS to restore the shared lock state. Signed-off-by: Greg Farnum <gregf@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: define on-wire types, constants for file locking supportGreg Farnum2-2/+36
Define the MDS operations and data types for doing file advisory locking with the MDS. Signed-off-by: Greg Farnum <gregf@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: add CEPH_FEATURE_FLOCK to the supported feature bitsGreg Farnum1-1/+1
This informs the server that we will accept v2 client_caps format and v2 client_reconnect format messages. Signed-off-by: Greg Farnum <gregf@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: support v2 reconnect encodingSage Weil2-13/+50
Encode either old or v2 encoding of client_reconnect message, depending on whether the peer has the FLOCK feature bit. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: support v2 client_caps encodingSage Weil1-2/+19
Add support for v2 encoding of MClientCaps, which includes a flock blob. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: move AES iv definition to shared headerSage Weil2-1/+3
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: fix decoding of pool snap infoSage Weil1-4/+26
The pool info contains a vector for snap_info_t, not snap ids. This fixes the broken decoding, which would declare teh update corrupt when a pool snapshot was created. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: make ->sync_fs not wait if wait==0Sage Weil1-4/+13
The ->sync_fs() super op only needs to wait if wait is true. Otherwise, just get some dirty cap writeback started. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: warn on missing snap realmSage Weil1-0/+1
Well, this Shouldn't Happen, so it would be helpful to know the caller when it does. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: print useful error message when crush rule not foundSage Weil1-2/+3
Include the crush_ruleset in the error message. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: use %pU to print uuid (fsid)Sage Weil3-15/+8
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: sync header defs with server codeSage Weil3-0/+11
Define ROLLBACK op, IFLOCK inode lock (for advisory file locking). Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: clean up header guardsSage Weil8-16/+16
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: strip misleading/obsolete version, feature infoSage Weil1-26/+4
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: specify supported features in super.hSage Weil2-3/+9
Specify the supported/required feature bits in super.h client code instead of using the definitions from the shared kernel/userspace headers (which will go away shortly). Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: clean up fsid mount optionSage Weil1-13/+39
Specify the fsid mount option in hex, not via the major/minor u64 hackery we had before. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: remove unused 'monport' mount optionSage Weil1-2/+0
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: handle ESTALE properly; on receipt send to authority if it wasn'tGreg Farnum2-8/+35
Signed-off-by: Greg Farnum <gregf@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: add ceph_get_cap_for_mds function.Greg Farnum2-0/+12
Signed-off-by: Greg Farnum <gregf@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: connect to export targets on cap exportSage Weil3-2/+23
When we get a cap EXPORT message, make sure we are connected to all export targets to ensure we can handle the matching IMPORT. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: connect to export targets if mds is laggySage Weil1-0/+15
If an MDS we are talking to may have failed, we need to open sessions to its potential export targets to ensure that any in-progress migration that may have involved some of our caps is properly handled. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: introduce helper to connect to mds export targetsSage Weil1-0/+37
There are a few cases where we need to open sessions with a given mds's potential export targets. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: only set num_pages in calc_layoutSage Weil1-3/+0
Setting it elsewhere is unnecessary and more fragile. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: do caps accounting per mds_clientYehuda Sadeh5-115/+131
Caps related accounting is now being done per mds client instead of just being global. This prepares ground work for a later revision of the caps preallocated reservation list. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: track laggy state of mds from mdsmapSage Weil3-2/+16
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: code cleanupYehuda Sadeh13-49/+46
Mainly fixing minor issues reported by sparse. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: skip if no auth cap in flush_snapsSage Weil1-7/+12
If we have a capsnap but no auth cap (e.g. because it is migrating to another mds), bail out and do nothing for now. Do NOT remove the capsnap from the flush list. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: simplify caps revocation, fix for multimdsSage Weil1-12/+18
The caps revocation should either initiate writeback, invalidateion, or call check_caps to ack or do the dirty work. The primary question is whether we can get away with only checking the auth cap or whether all caps need to be checked. The old code was doing...something else. At the very least, revocations from non-auth MDSs could break by triggering the "check auth cap only" case. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: simplify add_cap_releasesSage Weil1-16/+19
No functional change, aside from more useful debug output. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: drop unused argumentSage Weil3-9/+6
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: perform lazy reads when file mode and caps permitSage Weil4-13/+22
If the file mode is marked as "lazy," perform cached/buffered reads when the caps permit it. Adjust the rdcache_gen and invalidation logic accordingly so that we manage our cache based on the FILE_CACHE -or- FILE_LAZYIO cap bits. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: perform lazy writes when file mode and caps permitSage Weil2-8/+11
If we have marked a file as "lazy" (using the ceph ioctl), perform buffered writes when the MDS caps allow it. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: add LAZYIO ioctl to mark a file description for lazy consistencySage Weil2-0/+26
Allow an application to mark a file descriptor for lazy file consistency semantics, allowing buffered reads and writes when multiple clients are accessing the same file. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: request FILE_LAZYIO cap when LAZY file mode is setSage Weil2-27/+26
Also clean up the file flags -> file mode -> wanted caps functions while we're at it. This resyncs this file with userspace. Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-27ceph: use complete_all and wake_up_allYehuda Sadeh6-20/+20
This fixes an issue triggered by running concurrent syncs. One of the syncs would go through while the other would just hang indefinitely. In any case, we never actually want to wake a single waiter, so the *_all functions should be used. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-24ceph: Correct obvious typo of Kconfig variable "CRYPTO_AES"Robert P. J. Day1-1/+1
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-23ceph: fix dentry lease releaseSage Weil1-0/+1
When we embed a dentry lease release notification in a request, invalidate our lease so we don't think we still have it. Otherwise we can get all sorts of incorrect client behavior when multiple clients are interacting with the same part of the namespace. Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-23ceph: fix leak of dentry in ceph_init_dentry() error pathSage Weil1-1/+3
If we fail to allocate a ceph_dentry_info, don't leak the dn reference. Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-23ceph: fix pg_mapping leak on pg_temp updatesSage Weil1-11/+15
Free the ceph_pg_mapping structs when they are removed from the pg_temp rbtree. Also fix a leak in the __insert_pg_mapping() error path. Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-23ceph: fix d_release dop for snapdir, snapped dentriesSage Weil1-3/+9
We need to set the d_release dop for snapdir and snapped dentries so that the ceph_dentry_info struct gets released. We also use the dcache to cache readdir results when possible, which only works if we know when dentries are dropped from the cache. Since we don't use the dcache for readdir in the hidden snapdir, avoid that case in ceph_dentry_release. Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-22ceph: avoid dcache readdir for snapdirSage Weil1-0/+1
We should always go to the MDS for readdir on the hidden snapdir. The set of snapshots can change at any time; the client can't trust its cache for that. Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-16ceph: do not include cap/dentry releases in replayed messagesSage Weil2-0/+9
Strip the cap and dentry releases from replayed messages. They can cause the shared state to get out of sync because they were generated (with the request message) earlier, and no longer reflect the current client state. Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-16ceph: reuse request message when replaying against recovering mdsSage Weil1-5/+22
Replayed rename operations (after an mds failure/recovery) were broken because the request paths were regenerated from the dentry names, which get mangled when d_move() is called. Instead, resend the previous request message when replaying completed operations. Just make sure the REPLAY flag is set and the target ino is filled in. This fixes problems with workloads doing renames when the MDS restarts, where the rename operation appears to succeed, but on mds restart then fails (leading to client confusion, app breakage, etc.). Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09ceph: fix creation of ipv6 socketsSage Weil1-3/+5
Use the address family from the peer address instead of assuming IPv4. Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09ceph: fix parsing of ipv6 addressesSage Weil1-6/+19
Check for brackets around the ipv6 address to avoid ambiguity with the port number. Signed-off-by: Sage Weil <sage@newdream.net>