All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: fdmanana@gmail.com
Cc: Filipe Manana <fdmanana@suse.com>,
	fstests@vger.kernel.org,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] fstests: generic test for fsync after removing xattrs
Date: Mon, 23 Feb 2015 14:34:45 -0600	[thread overview]
Message-ID: <54EB8EE5.3000303@sandeen.net> (raw)
In-Reply-To: <CAL3q7H49ZtC+5mgtp5C5fDyXjCzMysWOUsA=kFAg9KATq4ot5A@mail.gmail.com>

On 2/23/15 2:24 PM, Filipe David Manana wrote:
> On Mon, Feb 23, 2015 at 8:14 PM, Eric Sandeen <sandeen@sandeen.net> wrote:
>> On 2/23/15 1:55 PM, Filipe Manana wrote:
>>> This test is motivated by an fsync issue discovered in btrfs.
>>> The issue was that the fsync log replay code did not remove xattrs that
>>> were deleted before the inode was fsynced. The result was unexpected
>>> and differed from xfs and ext3/4 for example.
>>>
>>> The btrfs issue was fixed by the following linux kernel patch:
>>>
>>>    Btrfs: remove deleted xattrs on fsync log replay
>>>
>>> Signed-off-by: Filipe Manana <fdmanana@suse.com>
>>> ---
>>>  tests/generic/061     | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  tests/generic/061.out |  10 +++++
>>>  tests/generic/group   |   1 +
>>>  3 files changed, 126 insertions(+)
>>>  create mode 100755 tests/generic/061
>>>  create mode 100644 tests/generic/061.out
>>>
>>> diff --git a/tests/generic/061 b/tests/generic/061
>>> new file mode 100755
>>> index 0000000..a5eb668
>>> --- /dev/null
>>> +++ b/tests/generic/061
>>> @@ -0,0 +1,115 @@
>>> +#! /bin/bash
>>> +# FS QA Test No. 061
>>
>> Could you describe what the test actually does first in the header
>> comment?  You have the btrfs-specific flaw, but (I say this after
>> having looked at 034 just this morning) sometimes it's nice to
>> have a concise description of the test.
>>
>> i.e.:
>>
>> # Test that log replay properly handles deleted xattrs after an fsync
>> <or whatever is the proper operational description>
>>
>> at the very top, so it's clear from a glance what the test *does*
>> without having to read through it.
> 
> Hi Eric,
> 
> I thought the initial summary was clear enough:
> 
> # FS QA Test No. 061
> #
> # This test is motivated by an fsync issue discovered in btrfs.
> # The issue was that the fsync log replay code did not remove xattrs that
> # were deleted before the inode was fsynced.
> 
> How more detailed/clear would you put it?

Eh, it's ok; it describes why you decided to write the test, not what the
test does.  Subtle difference?

...

>> I think maybe a
>>
>> _requires_metadata_journaling
>>
>> or similar might be a good idea.  Thoughts?  Unfortunately that would
>> need some special-casing for ext4, to see if it has jbd2 turned on or
>> not, but I can help with that.
>>
>> (dumpe2fs -h $TEST_DEV | grep has_journal)
> 
> Thanks for the heads up on that detail.
> 
> For the ext4 case, since the test creates the fs, if FSTYP == ext4,
> could we force passing -O has_journal to mkfs (or make sure -O
> ^has_journal is filtered out).

Well, if someone is explicitly testing nojournal ext4, I wouldn't turn
it on behind their backs just for this test; that'd be a bit odd.

Let me take a stab at a _requires_metadata_journaling() helper.

-Eric



  reply	other threads:[~2015-02-23 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 19:55 [PATCH] fstests: generic test for fsync after removing xattrs Filipe Manana
2015-02-23 20:14 ` Eric Sandeen
2015-02-23 20:24   ` Filipe David Manana
2015-02-23 20:34     ` Eric Sandeen [this message]
2015-02-24 11:21 ` [PATCH v2] " Filipe Manana

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=54EB8EE5.3000303@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=fdmanana@gmail.com \
    --cc=fdmanana@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.