($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Samasth via ltp <ltp@lists.linux.it>
To: Petr Vorel <pvorel@suse.cz>, Cyril Hrubis <chrubis@suse.cz>
Cc: calum.mackay@oracle.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] mremap06: fallocate is not supported on nfsv3
Date: Wed, 10 Apr 2024 22:58:27 -0700	[thread overview]
Message-ID: <678ab00d-008d-4d64-b58a-bc533af61a28@oracle.com> (raw)
In-Reply-To: <20240410133337.GA205337@pevik>



On 4/10/24 6:33 AM, Petr Vorel wrote:
>> Hi!
>>> The solution would be to at least check for tst_fs_type(".") == TST_NFS_MAGIC.
> 
>> I would go for this at the moment, that is the easiest fix at the
>> moment.
> 
> So you mean we risk we lost fallocate support in NFSv4.2 for the simplicity. OK
> for me.
> 
>>> Perfect solution would IMHO be to check for NFS version (e.g. in /proc/mounts)
>>> and TCONF only on NFSv3.
> 
>> And is nfsv4 enough, wasn't it added in nfsv4.2? Do we need to parse
>> /proc/net/rpc/nfs to figure out if nfs fallocate() is supported?
> 
> Yes. First, I got confused 95d871f03cae ("nfsd: Add ALLOCATE support") [1] which is
> not mentioning NFS version, because it's for nfsd. But looking other commits,
> e.g. 95d871f03cae ("nfsd: Add ALLOCATE support") [2], 624bd5b7b683 ("nfs: Add
> DEALLOCATE support") [3] and the docs from merge commit in 3.19 [4] and
> kernelnewbies [5], it's clear: it's for NFSv4.2.
> 
> BTW is that whole fallocate() support? [4] mentions "NFSv4.2 client support for
> hole punching and preallocation.", commit [3]: "This patch adds support for
> using the NFS v4.2 operation DEALLOCATE to punch holes in a file.", commit
> b0cb9085239a ("nfsd: Add DEALLOCATE support") [6] uses FALLOC_FL_PUNCH_HOLE
> flag. All that IMHO means it's adding just FALLOC_FL_PUNCH_HOLE support into
> NFSv4.2. Thus other (basic) fallocate() might work in all NFS versions, right?
> 
> That would suggest when addin safe_fallocate() we should check for NFS
> (tst_fs_type(".") == TST_NFS_MAGIC) only when FALLOC_FL_PUNCH_HOLE is used.
> (I got from your answer we ignore missing support for older filesystems,
> we can always add the check once somebody reports invalid error).

Thanks for the detailed explanation of the issue. I will send out a v2 
patch which would check the file system using tst_fs_type(".") before 
printing TCONF.

I will also send a patch to update the man page to include the 
information about nfs.

Thanks,
Samasth.
> 
> Kind regards,
> Petr
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=95d871f03cae6b49de040265cf88cbe2a16b9f05
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f4ac1674f5da420ef17896f0f222c5215ebcde80
> [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=624bd5b7b683c978c6d5f4e9f6142cfb3470983d
> [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e20db597b6264de55ea6636fc79b1e4aaa89d129
> [5] https://kernelnewbies.org/Linux_3.19#NFSv4.2_support_for_hole_punching_and_preallocation
> [6] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0cb9085239a20b7482ddd4839dd1d5476801dfa

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-04-11  5:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 15:00 [LTP] [PATCH] mremap06: fallocate is not supported on nfsv3 Samasth Norway Ananda
2024-04-05 12:01 ` Cyril Hrubis
2024-04-08 21:50   ` Samasth via ltp
2024-04-09 10:17     ` Petr Vorel
2024-04-10  9:30       ` Cyril Hrubis
2024-04-10  9:46         ` Petr Vorel
2024-04-10  9:53           ` Petr Vorel
2024-04-10 10:08           ` Cyril Hrubis
2024-04-10 13:33             ` Petr Vorel
2024-04-11  5:58               ` Samasth via ltp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-26 20:56 Samasth Norway Ananda

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=678ab00d-008d-4d64-b58a-bc533af61a28@oracle.com \
    --to=ltp@lists.linux.it \
    --cc=calum.mackay@oracle.com \
    --cc=chrubis@suse.cz \
    --cc=pvorel@suse.cz \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).