From: Cyril Hrubis <chrubis@suse.cz>
To: samasth.norway.ananda@oracle.com
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [External] : Re: [PATCH] fallocate03: FALLOC_FL_PUNCH_HOLE must be used with FALLOC_FL_KEEP_SIZE
Date: Tue, 10 Dec 2024 12:03:22 +0100 [thread overview]
Message-ID: <Z1gf-odBjJ3XQhmT@yuki.lan> (raw)
In-Reply-To: <0865e127-cd49-4d8a-b334-039f94b80e76@oracle.com>
Hi!
> > From the fallocate() manual, I see that:
> > "The FALLOC_FL_PUNCH_HOLE flag must be ORed withFALLOC_FL_KEEP_SIZE in mode"
> >
> > But it doesn't mean we wouldn't use FALLOC_FL_KEEP_SIZE singly in this test.
>
> Oh okay. Sorry mistook that.
The problem here is that most of the fallocate() modes are not supported
on NFS just have a look on how fallocate is implemented in
linux/fs/nfs/nfs4file.c:
static long nfs42_fallocate(struct file *filep, int mode, loff_t offset, loff_t len)
{
struct inode *inode = file_inode(filep);
long ret;
if (!S_ISREG(inode->i_mode))
return -EOPNOTSUPP;
if ((mode != 0) && (mode != (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE)))
return -EOPNOTSUPP;
...
So only two combinations of modes are actually supported. I guess that
it may make sense to skip the unsupported modes for NFS.
And it may make sense to enable the test for all_filesystems as well.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2024-12-10 11:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 1:05 [LTP] [PATCH] fallocate03: FALLOC_FL_PUNCH_HOLE must be used with FALLOC_FL_KEEP_SIZE Samasth Norway Ananda via ltp
2024-07-04 7:53 ` Li Wang
2024-07-23 17:55 ` [LTP] [External] : " Samasth via ltp
2024-12-10 11:03 ` Cyril Hrubis [this message]
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=Z1gf-odBjJ3XQhmT@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=samasth.norway.ananda@oracle.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