Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM: backport chain_xattr thing for xfs to hammer #4973

Closed
wants to merge 4 commits into from

Conversation

liewegas
Copy link
Member

http://tracker.ceph.com/issues/11981

We should be sure that this is worth the backport because it is a one-way street: once you stripe xattrs over small values you can't downgrade to a previous hammer point release.

If we wrote an xattr that was a multiple of a chunk, we will try to read
the next chunk and get ENODATA.  If that happens bail out of the loop and
assume we've read the whole thing.

Backport: hammer, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 8614dce)
XFS has a hard limit of 255 (or 254?) bytes for xattrs to be inlined in the
inode due to a single byte for the length in the on-disk format.  If we
have an xattr that is a bit bigger than that it will get kicked out into a
separate extent, but if we stripe it across a few shorter xattrs it can
be inlined when the xfs inode is e.g. 2K.

Adjust the chain_xattr logic to capture this case.  Note that we are doing
this unconditionally regardless of fs type, but that is probably okay
given that most users use XFS and the cost isn't huge.

Reported-by: Ning Yao <yaoning@ruijie.com.cn>
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit c6cdb40)
ENOATTR == ENODATA on Linux; other systems return ENOATTR.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit b2cd80c)
...if it isn't already defined.  Haomai reported seeing this somewhere.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 886f5a9)
@ghost
Copy link

ghost commented Jun 16, 2015

Is there an issue associated with this ?

@liewegas
Copy link
Member Author

bug was 11969, backport issue 11981

On Tue, 16 Jun 2015, Loic Dachary wrote:

Is there an issue associated with this ?

?
Reply to this email directly or view it on GitHub.[AAabhybYSQo3BWKlwwITc5xyzziwbx2Uks5oUIGSgaJpZM4FEwub.gif]

@yuyuyu101
Copy link
Member

Hi Sage, do we actually do performance benchmark for this improvement?

@yuyuyu101
Copy link
Member

I mean is it possible it won't behavior better as we expect ?

@guangyy
Copy link
Contributor

guangyy commented Jun 17, 2015

Just tried this patch on Giant with radosgw, all xattrs can get inline after applying this patch.

I will try to find an environment to test, and hopefully get some results to share.

@liewegas
Copy link
Member Author

liewegas commented Jun 17, 2015 via email

@markhpc
Copy link
Member

markhpc commented Jun 17, 2015

I was intending to test this but am bogged down in other things at the moment. Might not happen until after RHS.

@liewegas liewegas changed the title backport chain_xattr thing for xfs to hammer DNM: backport chain_xattr thing for xfs to hammer Jun 18, 2015
@ghost ghost assigned ghost and unassigned athanatos Jun 19, 2015
@ghost
Copy link

ghost commented Jun 19, 2015

@athanatos as soon as you think this is ready for testing, we can add it to the backport integration branch

@liewegas
Copy link
Member Author

We're choosing not to backport this to hammer.

@liewegas liewegas closed this Jul 14, 2015
@liewegas liewegas deleted the wip-chain-xattr-hammer branch November 23, 2016 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants