public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xfs: avoid overflow of attr3 leaf block headers with 64k blocks
@ 2015-02-24 20:50 Brian Foster
  2015-02-24 20:50 ` [PATCH 1/2] xfs: pass attr geometry to attr leaf header conversion functions Brian Foster
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Brian Foster @ 2015-02-24 20:50 UTC (permalink / raw)
  To: xfs

Hi all,

As it turns out, some of the leaf block codepaths other than xattr
addition look like they wouldn't work properly with an unaligned
firstused value as demonstrated in my previous patch:

http://oss.sgi.com/archives/xfs/2015-02/msg00479.html

Here's an alternate approach that handles the overflow in the header
conversion functions. It passes the basic tests so far, but more testing
is needed to make sure I've made valid assumptions. Thoughts?

FWIW, another approach could be to leak the last few bytes of the blocks
(e.g., max firstused at the last valid aligned offset and update freemap
size accordingly)...

Brian

Brian Foster (2):
  xfs: pass attr geometry to attr leaf header conversion functions
  xfs: use larger in-core attr firstused field and detect overflow

 fs/xfs/libxfs/xfs_attr_leaf.c | 99 +++++++++++++++++++++++++++++--------------
 fs/xfs/libxfs/xfs_attr_leaf.h |  6 ++-
 fs/xfs/libxfs/xfs_da_format.h |  8 +++-
 fs/xfs/xfs_attr_inactive.c    |  3 +-
 fs/xfs/xfs_attr_list.c        |  9 ++--
 5 files changed, 86 insertions(+), 39 deletions(-)

-- 
1.9.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-25 21:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24 20:50 [PATCH 0/2] xfs: avoid overflow of attr3 leaf block headers with 64k blocks Brian Foster
2015-02-24 20:50 ` [PATCH 1/2] xfs: pass attr geometry to attr leaf header conversion functions Brian Foster
2015-03-25 20:51   ` Dave Chinner
2015-02-24 20:50 ` [PATCH 2/2] xfs: use larger in-core attr firstused field and detect overflow Brian Foster
2015-03-25 21:04   ` Dave Chinner
2015-03-25 16:56 ` [PATCH 0/2] xfs: avoid overflow of attr3 leaf block headers with 64k blocks Brian Foster
2015-03-25 17:59   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox