linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Amir Goldstein <amir73il@gmail.com>, Hugh Dickins <hughd@google.com>
Cc: Christian Brauner <brauner@kernel.org>,
	Jeff Layton <jlayton@kernel.org>, Chuck Lever <cel@kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Daniel Gomez <da.gomez@samsung.com>,
	"yukuai (C)" <yukuai3@huawei.com>,
	"yangerkun@huaweicloud.com" <yangerkun@huaweicloud.com>
Subject: Re: [RFC PATCH 2/2] libfs: Improve behavior when directory offset values wrap
Date: Wed, 4 Dec 2024 16:05:50 -0500	[thread overview]
Message-ID: <5d1e7ea8-be4c-4906-a1d4-835fa46da605@oracle.com> (raw)
In-Reply-To: <CAOQ4uxhFdY3Z_jS_Z8EpziHAQuQEZgi+Y1ZLyhu-OXfprjszgQ@mail.gmail.com>

On 11/22/24 3:49 AM, Amir Goldstein wrote:
> On Thu, Nov 21, 2024 at 10:30 PM Chuck Lever <chuck.lever@oracle.com> wrote:
>>
>> On Thu, Nov 21, 2024 at 01:18:05PM -0800, Hugh Dickins wrote:
>>> On Thu, 21 Nov 2024, Chuck Lever III wrote:
>>>>
>>>> I will note that tmpfs hangs during generic/449 for me 100%
>>>> of the time; the failure appears unrelated to renames. Do you
>>>> know if there is regular CI being done for tmpfs? I'm planning
>>>> to add it to my nightly test rig once I'm done here.
>>>
>>> For me generic/449 did not hang, just took a long time to discover
>>> something uninteresting and eventually declare "not run".  Took
>>> 14 minutes six years ago, when I gave up on it and short-circuited
>>> the "not run" with the patch below.
>>>
>>> (I carry about twenty patches for my own tmpfs fstests testing; but
>>> many of those are just for ancient 32-bit environment, or to suit the
>>> "huge=always" option. I never have enough time/priority to review and
>>> post them, but can send you a tarball if they might of use to you.)

I missed this offer first time around. Yes, please forward these.


>>> generic/449 is one of those tests which expects metadata to occupy
>>> space inside the "disk", in a way which it does not on tmpfs (and a
>>> quick glance at its history suggests btrfs also had issues with it).
>>>
>>> [PATCH] generic/449: not run on tmpfs earlier
>>>
>>> Do not waste 14 minutes to discover that tmpfs succeeds in
>>> setting acls despite running out of space for user attrs.
>>>
>>> Signed-off-by: Hugh Dickins <hughd@google.com>
>>> ---
>>>   tests/generic/449 | 5 +++++
>>>   1 file changed, 5 insertions(+)
>>>
>>> diff --git a/tests/generic/449 b/tests/generic/449
>>> index 9cf814ad..a52a992b 100755
>>> --- a/tests/generic/449
>>> +++ b/tests/generic/449
>>> @@ -22,6 +22,11 @@ _require_test
>>>   _require_acls
>>>   _require_attrs trusted
>>>
>>> +if [ "$FSTYP" = "tmpfs" ]; then
>>> +     # Do not waste 14 minutes to discover this:
>>> +     _notrun "$FSTYP succeeds in setting acls despite running out of space for user attrs"
>>> +fi
>>> +
>>>   _scratch_mkfs_sized $((256 * 1024 * 1024)) >> $seqres.full 2>&1
>>>   _scratch_mount || _fail "mount failed"
>>>
>>> --
>>> 2.35.3
>>
>> My approach (until I could look into the failure more) has been
>> similar:
>>
>> diff --git a/tests/generic/449 b/tests/generic/449
>> index 9cf814ad326c..8307a43ce87f 100755
>> --- a/tests/generic/449
>> +++ b/tests/generic/449
>> @@ -21,6 +21,7 @@ _require_scratch
>>   _require_test
>>   _require_acls
>>   _require_attrs trusted
>> +_supported_fs ^nfs ^overlay ^tmpfs
>>
> 
> nfs and overlay are _notrun because they do not support _scratch_mkfs_sized
> 
>>   _scratch_mkfs_sized $((256 * 1024 * 1024)) >> $seqres.full 2>&1
>>   _scratch_mount || _fail "mount failed"
>>
>>
>> I stole it from somewhere else, so it's not tmpfs-specific.
> 
> I think opt-out for a certain fs makes sense in some tests, but it is
> prefered to describe the requirement that is behind the opt-out.
> 
> For example, you thought that nfs,overlay,tmpfs should all opt-out
> from this test. Why? Which property do they share in common and
> how can it be described in a generic way?
> 
> I am not talking about a property that can be checked.
> Sometimes we need to make groups of filesystems that share a common
> property that cannot be tested, to better express the requirements.
> 
> _fstyp_has_non_default_seek_data_hole() is the only example that
> comes to mind but there could be others.
> 
> Thanks,
> Amir.

OK, I finally had a few minutes to look at this more closely.

As Hugh points out, tmpfs will permit users to set trusted xattrs
even when the file system is full. So IMO it should be excluded
from generic/449 explicitly -- this test won't produce meaningful
results. On my systems it runs for hours.

Hugh's patch above seems adequate. IMO that change or something
like it is entirely appropriate for upstream fstests.

NFS does not expose trusted xattrs on remote files.
"_require_attrs trusted" ought to block generic/449 already. I
will investigate/confirm that.

I'm happy to drop "^overlay". I don't have any explicit concern
about that file system type.


-- 
Chuck Lever


  parent reply	other threads:[~2024-12-04 21:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-17 21:32 [RFC PATCH 0/2] Improve simple directory offset wrap behavior cel
2024-11-17 21:32 ` [RFC PATCH 1/2] libfs: Return ENOSPC when the directory offset range is exhausted cel
2024-11-18 19:55   ` Jeff Layton
2024-11-17 21:32 ` [RFC PATCH 2/2] libfs: Improve behavior when directory offset values wrap cel
2024-11-18 20:00   ` Jeff Layton
2024-11-18 20:58     ` Chuck Lever
2024-11-20  8:59       ` Christian Brauner
2024-11-20 15:05         ` Chuck Lever
2024-11-21  8:34           ` Christian Brauner
2024-11-21 14:54             ` Chuck Lever III
2024-11-21 21:18               ` Hugh Dickins
2024-11-21 21:29                 ` Chuck Lever
2024-11-22  8:49                   ` Amir Goldstein
2024-11-22 14:24                     ` Chuck Lever III
2024-12-04 21:05                     ` Chuck Lever [this message]
2024-11-22 12:57               ` Christian Brauner
2024-11-24 21:28                 ` Chuck Lever III
2024-11-20  9:01 ` [RFC PATCH 0/2] Improve simple directory offset wrap behavior Christian Brauner

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=5d1e7ea8-be4c-4906-a1d4-835fa46da605@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=cel@kernel.org \
    --cc=da.gomez@samsung.com \
    --cc=hughd@google.com \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yangerkun@huaweicloud.com \
    --cc=yukuai3@huawei.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