From: Christoph Hellwig <hch@infradead.org>
To: Eryu Guan <eguan@redhat.com>
Cc: linux-xfs@vger.kernel.org, billodo@redhat.com, xfs@oss.sgi.com
Subject: Re: [PATCH] libxcmd: fix counting of xfs entries in fs_table_insert
Date: Sun, 25 Sep 2016 07:31:55 -0700 [thread overview]
Message-ID: <20160925143155.GB29268@infradead.org> (raw)
In-Reply-To: <1474798162-25960-1-git-send-email-eguan@redhat.com>
On Sun, Sep 25, 2016 at 06:09:22PM +0800, Eryu Guan wrote:
> Commit bb80e3d6cd04 ("libxcmd: populate fs table with xfs entries
> first, foreign entries last") adds a new counter "xfs_fs_count" and
> increases the counter when inserting an XFS entry.
>
> But it missed a counter when fs_count is zero (inserting the first
> path) and the entry has no FS_FOREIGN bit set, i.e. the first XFS
> entry doesn't increase xfs_fs_count.
>
> This results in args_command() mess and infinite loop in xfs/244
> when testing v4 XFS (xfs/244 notrun on v5 XFS, but this bug still
> reproduces on v5 XFS). e.g.
>
> mkfs -t xfs -f /dev/sda5
> mount -o pquota /dev/sda5 /mnt/xfs
> mkdir /mnt/xfs/project
> touch /mnt/xfs/project/testfile
> xfs_quota -x -c "project -s -p /mnt/xfs/project/testfile 1" /dev/sda5
>
> Fix it by increasing xfs_fs_count when flags has no FS_FOREIGN bit.
Looks ifne,
Reviewed-by: Christoph Hellwig <hch@lst.de>
Can I assume you'll add the above test to xfstests?
next prev parent reply other threads:[~2016-09-25 14:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-25 10:09 [PATCH] libxcmd: fix counting of xfs entries in fs_table_insert Eryu Guan
2016-09-25 14:31 ` Christoph Hellwig [this message]
2016-09-25 14:58 ` Eryu Guan
2016-09-25 16:12 ` Christoph Hellwig
2016-09-25 21:38 ` Dave Chinner
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=20160925143155.GB29268@infradead.org \
--to=hch@infradead.org \
--cc=billodo@redhat.com \
--cc=eguan@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).