Feature #4161
closed
MDS: add file layout to head object
Added by Greg Farnum about 11 years ago.
Updated almost 8 years ago.
Description
In support of #4145, we're going to need a way to get a file's layout even if we lose the containing directory. Add a file layout xattr that gets added after the first write.
Presumably this will just slot in alongside the backtrace code that happens on file creates and pool changes (but not on renames, hurray!).
- Status changed from New to In Progress
- Assignee set to John Spray
- Status changed from In Progress to Fix Under Review
- Status changed from Fix Under Review to Resolved
commit 8d9c95fa42dd1c31fcb65918fb2180281380269d
Author: John Spray <john.spray@redhat.com>
Date: Wed Jun 24 23:58:36 2015 +0100
mds: store layout on header object
This is surprisingly simple because we were already redundantly
calling store_backtrace whenever the layout changed! That was
a side effect of the way add_old_pool is handled, the backtrace
version is bumped to latest even if the "old" pool is the
current one.
The upshot is that if we accept the existing behaviour of
also unnecessarily updating the 'parent' xattr, keeping
the new 'layout' xattr update requires no new dirty flags. This
is a twitchy enough behaviour that new tests are needed to guard
against regressions though.
Fixes: #4161
Signed-off-by: John Spray <john.spray@redhat.com>
Also available in: Atom
PDF