From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Chandan Babu R <chandanrlinux@gmail.com>
Cc: linux-xfs@vger.kernel.org, david@fromorbit.com,
bfoster@redhat.com, hch@infradead.org
Subject: Re: [PATCH 0/7] xfs: Extend per-inode extent counters.
Date: Mon, 8 Jun 2020 10:31:03 -0700 [thread overview]
Message-ID: <20200608173103.GH1334206@magnolia> (raw)
In-Reply-To: <20200606082745.15174-1-chandanrlinux@gmail.com>
On Sat, Jun 06, 2020 at 01:57:38PM +0530, Chandan Babu R wrote:
> The commit xfs: fix inode fork extent count overflow
> (3f8a4f1d876d3e3e49e50b0396eaffcc4ba71b08) mentions that 10 billion
> per-inode data fork extents should be possible to create. However the
> corresponding on-disk field has an signed 32-bit type. Hence this
> patchset extends the on-disk field to 64-bit length out of which only
> the first 47-bits are valid.
>
> Also, XFS has a per-inode xattr extent counter which is 16 bits
> wide. A workload which
> 1. Creates 1 million 255-byte sized xattrs,
> 2. Deletes 50% of these xattrs in an alternating manner,
> 3. Tries to insert 400,000 new 255-byte sized xattrs
> causes the following message to be printed on the console,
>
> XFS (loop0): xfs_iflush_int: detected corrupt incore inode 131, total extents = -19916, nblocks = 102937, ptr ffff9ce33b098c00
> XFS (loop0): xfs_do_force_shutdown(0x8) called from line 3739 of file fs/xfs/xfs_inode.c. Return address = ffffffffa4a94173
>
> This indicates that we overflowed the 16-bits wide xattr extent
> counter.
>
> I have been informed that there are instances where a single file
> has > 100 million hardlinks. With parent pointers being stored in xattr,
> we will overflow the 16-bits wide xattr extent counter when large
> number of hardlinks are created. Hence this patchset extends the
> on-disk field to 32-bit length.
>
> This patchset also includes the previously posted "Fix log reservation
> calculation for xattr insert operation" patch as a bug fix. It
> replaces the xattr set "mount" and "runtime" reservations with just
> one static reservation. Hence we don't need the functionality to
> calculate maximum sized 'xattr set' reservation separately anymore.
>
> The patches can also be obtained from
> https://github.com/chandanr/linux.git at branch xfs-extend-extent-counters.
>
> Chandan Babu R (7):
> xfs: Fix log reservation calculation for xattr insert operation
What happened to that whole patchset with struct xfs_attr_set_resv
and whatnot? Did all that get condensed down to this single patch?
--D
> xfs: Check for per-inode extent count overflow
> xfs: Compute maximum height of directory BMBT separately
> xfs: Add "Use Dir BMBT height" argument to XFS_BM_MAXLEVELS()
> xfs: Use 2^27 as the maximum number of directory extents
> xfs: Extend data extent counter to 47 bits
> xfs: Extend attr extent counter to 32 bits
>
> fs/xfs/libxfs/xfs_attr.c | 11 +--
> fs/xfs/libxfs/xfs_bmap.c | 118 +++++++++++++++++++++++-------
> fs/xfs/libxfs/xfs_bmap.h | 3 +-
> fs/xfs/libxfs/xfs_bmap_btree.h | 4 +-
> fs/xfs/libxfs/xfs_format.h | 49 ++++++++++---
> fs/xfs/libxfs/xfs_inode_buf.c | 65 ++++++++++++++---
> fs/xfs/libxfs/xfs_inode_buf.h | 2 +
> fs/xfs/libxfs/xfs_inode_fork.c | 125 ++++++++++++++++++++++++++++++--
> fs/xfs/libxfs/xfs_inode_fork.h | 2 +
> fs/xfs/libxfs/xfs_log_format.h | 8 +-
> fs/xfs/libxfs/xfs_log_rlimit.c | 29 --------
> fs/xfs/libxfs/xfs_trans_resv.c | 75 +++++++++----------
> fs/xfs/libxfs/xfs_trans_resv.h | 9 +--
> fs/xfs/libxfs/xfs_trans_space.h | 48 ++++++------
> fs/xfs/libxfs/xfs_types.h | 11 ++-
> fs/xfs/scrub/inode.c | 14 ++--
> fs/xfs/xfs_bmap_item.c | 3 +-
> fs/xfs/xfs_inode.c | 10 ++-
> fs/xfs/xfs_inode_item.c | 10 ++-
> fs/xfs/xfs_inode_item_recover.c | 22 +++++-
> fs/xfs/xfs_mount.c | 5 +-
> fs/xfs/xfs_mount.h | 1 +
> fs/xfs/xfs_reflink.c | 4 +-
> 23 files changed, 451 insertions(+), 177 deletions(-)
>
> --
> 2.20.1
>
next prev parent reply other threads:[~2020-06-08 17:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-06 8:27 [PATCH 0/7] xfs: Extend per-inode extent counters Chandan Babu R
2020-06-06 8:27 ` [PATCH 1/7] xfs: Fix log reservation calculation for xattr insert operation Chandan Babu R
2020-06-19 14:33 ` Christoph Hellwig
2020-06-20 12:53 ` Chandan Babu R
2020-06-06 8:27 ` [PATCH 2/7] xfs: Check for per-inode extent count overflow Chandan Babu R
2020-06-08 16:24 ` Darrick J. Wong
2020-06-08 16:32 ` Darrick J. Wong
2020-06-09 14:22 ` Chandan Babu R
2020-06-09 17:07 ` Darrick J. Wong
2020-06-10 6:24 ` Chandan Babu R
2020-06-09 14:22 ` Chandan Babu R
2020-06-09 17:10 ` Darrick J. Wong
2020-06-19 14:36 ` Christoph Hellwig
2020-06-19 21:31 ` Darrick J. Wong
2020-06-20 12:53 ` Chandan Babu R
2020-06-06 8:27 ` [PATCH 3/7] xfs: Compute maximum height of directory BMBT separately Chandan Babu R
2020-06-08 20:59 ` Darrick J. Wong
2020-06-09 14:23 ` Chandan Babu R
2020-06-09 18:40 ` Darrick J. Wong
2020-06-10 6:23 ` Chandan Babu R
2020-06-11 6:38 ` Chandan Babu R
2020-06-06 8:27 ` [PATCH 4/7] xfs: Add "Use Dir BMBT height" argument to XFS_BM_MAXLEVELS() Chandan Babu R
2020-06-08 17:50 ` Darrick J. Wong
2020-06-09 14:23 ` Chandan Babu R
2020-06-06 8:27 ` [PATCH 5/7] xfs: Use 2^27 as the maximum number of directory extents Chandan Babu R
2020-06-08 16:52 ` Darrick J. Wong
2020-06-09 14:23 ` Chandan Babu R
2020-06-06 8:27 ` [PATCH 6/7] xfs: Extend data extent counter to 47 bits Chandan Babu R
2020-06-08 17:14 ` Darrick J. Wong
2020-06-09 14:23 ` Chandan Babu R
2020-08-31 21:05 ` Darrick J. Wong
2020-06-19 14:38 ` Christoph Hellwig
2020-06-20 12:52 ` Chandan Babu R
2020-06-06 8:27 ` [PATCH 7/7] xfs: Extend attr extent counter to 32 bits Chandan Babu R
2020-06-08 17:21 ` Darrick J. Wong
2020-06-09 14:22 ` Chandan Babu R
2020-06-19 14:39 ` Christoph Hellwig
2020-06-20 12:53 ` Chandan Babu R
2020-06-08 17:31 ` Darrick J. Wong [this message]
2020-06-09 14:22 ` [PATCH 0/7] xfs: Extend per-inode extent counters Chandan Babu R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200608173103.GH1334206@magnolia \
--to=darrick.wong@oracle.com \
--cc=bfoster@redhat.com \
--cc=chandanrlinux@gmail.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox