[Top] [All Lists]

[PATCH 0/2] xfs: avoid overflow of attr3 leaf block headers with 64k blo

To: xfs@xxxxxxxxxxx
Subject: [PATCH 0/2] xfs: avoid overflow of attr3 leaf block headers with 64k blocks
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Tue, 24 Feb 2015 15:50:22 -0500
Delivered-to: xfs@xxxxxxxxxxx
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:


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 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(-)


<Prev in Thread] Current Thread [Next in Thread>