getacl fixes V2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 23 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | NFSv4: fix getacl head length estimationfs/ | +1 | 3 replies | |
| 2/6 | NFSv4: fix getacl ERANGE for some ACL buffer sizesfs/ | +2 | 7 replies | |
| 3/6 | NFSv4: minor acl caching policy documentationfs/ | +7 | 0 replies | |
| 4/6 | NFSv4: minor getacl cleanupfs/ | +3 | 1 reply | |
| 5/6 | NFSv4: simplify getacl decodingfs/ fs/ include/ | +45 | 1 reply | |
| 6/6 | NFSv4: allow getacl rpc to allocate pages on demandfs/ | +7 | 15 replies |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Kinglong Mee | Andreas Gruenbacher |
|---|---|---|
| 1/6 | R-b R-b | |
| 2/6 | R-b | |
| 3/6 | ||
| 4/6 | R-b | |
| 5/6 | R-b | |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] getacl fixes V2
From: "J. Bruce Fields" <[email protected]>
Quoted 21 lines
The getacl code is allocating enough space to handle the ACL data but not to handle the bitmask, which can lead to spurious ERANGE errors when the end of the ACL gets close to a page boundary.
Dros addressed this by letting the rpc layer allocate pages as necessary on demand, as the NFSv3 ACL code does.
On its own that didn't do the job either, because we don't handle the case where
xdr_shrink_bufheadneeds to move data around in the xdr buf. Andxdr_shrink_bufheadwas getting called every time due to an incorrect estimate in anxdr_inline_pagescall.So, I fixed that estimate. That still leaves the chance of a bug in the rare case
xdr_shrink_bufheadis called.We could fix up the handling of the
xdr_shrink_bufheadcase, but I don't see the point of shifting this data around in the first place. We're not doing anything like zero-copy here, we're just going to copy the data out into the buffer we were passed. The NFSv3 ACL code doesn't bother with this.
Quoted 7 lines
It's simpler just to pass down the buffer to the xdr layer and let it copy the ACL out.
The result looks a lot simpler and more obviously correct than this code has been, though I'm not particularly happy with the sequence of patches that gets us there; it would be better to squash together Dros's and my patch and then split out the result some more sensible way.
Done; here it is split out so the first two patches are minimal bugfixes, the next two do some minor cleanup, the fifth converts to copying data into "buf" from the xdr decoder, and the final one converts to on-demand allocation (the part Chuck is asking about).
I left Dros as the author on the minimal ERANGE fix and the on-demand allocation, though that choice is a little arbitrary as the changes are all split up differently; Dros, let me know if that's problem.
It'd be nice to get at least the first two in (and possibly cc'd to stable as well).
--b.
Quoted 5 lines
Sorry for the delay getting back to this. Older discussions:
https://marc.info/?t=138452791200001&r=1&w=2 http://marc.info/?t=138506891000003&r=1&w=2
J. Bruce Fields (4):
NFSv4: fix getacl head length estimation
NFSv4: minor acl caching policy documentation
NFSv4: minor getacl cleanup
NFSv4: simplify getacl decoding
Weston Andros Adamson (2):
NFSv4: fix getacl ERANGE for some ACL buffer sizes
NFSv4: allow getacl rpc to allocate pages on demand
fs/nfs/nfs4proc.c | 114 +++++++++++++++++++++++------------------------- fs/nfs/nfs4xdr.c | 29 +++--------- include/linux/nfs_xdr.h | 4 +- 3 files changed, 62 insertions(+), 85 deletions(-)
Signature · 1 line
2.9.3