kclient caps
- explicit release
-- pin inode only if dirty caps
- - release on destroy_inode
+ - this makes open on client work better, since we care less about the mds 'wanted' value.
+ (we only need to update it if/when we release the caps we still want, or async on open
+ if we don't have them yet)
- two session lists: dirty_caps, clean_caps
-
alternative #1:
-- keep CAP_PIN on _all_ inodes
+- keep CAP_PIN on _all_ inodes, and don't pin inodes with caps.
- release on destroy_inode
+ - this will require some message preallocation trickery to avoid allocating on iput where possible.
+ - maybe maintain a pool of N release messages, each able to release M caps.. and add to the pool whenever we reach
+ N * M inodes with caps? and periodically send the release messages early IFF we can allocate a new message in its place...
- we only need to worry about flushing dirty caps on a timely basis
- getattr guaranteed safe
+- higher memory utilization on the mds
- on client reconnect we have TONS of caps to reassert... :/ what then?
- the mds can't keep them all in the journal, so it'll need to reload some, and that's not reliable. so we'll still end up with inodes without valid caps.
- but we'll still get all _open file_ caps. and everything else (except CWD) will need to be rediscovered via lookup
- make clean_caps an lru
- touch caps on revalidate
- that should avoid releasing caps just prior to getattr
-- maybe still pin cap inodes
-- periodic trimmer to efficiently release caps in big batches
+- maybe still pin cap inodes for now.
+ - eventually avoid it, using the release on destroy_inode strategy above
+- periodic trimmer to efficiently release the oldest clean_caps in big batches