From: Nicolas Boichat <email@example.com> To: "Darrick J. Wong" <firstname.lastname@example.org> Cc: Dave Chinner <email@example.com>, Luis Lozano <firstname.lastname@example.org>, Ian Lance Taylor <email@example.com>, Alexander Viro <firstname.lastname@example.org>, Amir Goldstein <email@example.com>, "Darrick J. Wong" <firstname.lastname@example.org>, Dave Chinner <email@example.com>, firstname.lastname@example.org, lkml <email@example.com> Subject: Re: [PATCH] fs: generic_copy_file_checks: Do not adjust count based on file size Date: Fri, 12 Feb 2021 12:48:58 +0800 [thread overview] Message-ID: <CANMq1KCcSZL=_CC2r2Yv8e_p7JY9RKgJ1kSVMrCAO0ZokSupeg@mail.gmail.com> (raw) In-Reply-To: <20210128055726.GF7695@magnolia> On Thu, Jan 28, 2021 at 1:57 PM Darrick J. Wong <firstname.lastname@example.org> wrote: > > On Thu, Jan 28, 2021 at 08:46:04AM +0800, Nicolas Boichat wrote: [snip] > > Okay, so, based on this and Al's reply, I see 2 things we can do: > > 1. Go should probably not use copy_file_range in a common library > > function, as I don't see any easy way to detect this scenario > > currently (detect 0 size? sure, but that won't work with the example > > you provide above). And the man page should document this behaviour > > more explicitly to prevent further incorrect usage. > > 2. Can procfs/sysfs/debugfs and friends explicitly prevent usage of > > copy_file_range? (based on Al's reply, there seems to be no way to > > implement it correctly as seeking in such files will not work in case > > of short writes) > > One /could/ make those three provide a phony CFR implementation that > would return -EOPNOTSUPP, though like others have said, it's weird to > have regular files that aren't quite regular. Not sure where that > leaves them, though... Not that simple, as the issue happens on cross-filesystem operations where file_operations->copy_file_range is not called (and also, that'd require modifying operations for every single generated file... Anyway, made an attempt here: https://email@example.com/T/#t > --D > > > > > Thanks, > > > > > > > > Cheers, > > > > > > Dave. > > > -- > > > Dave Chinner > > > firstname.lastname@example.org
next prev parent reply other threads:[~2021-02-12 4:49 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-26 5:50 Nicolas Boichat 2021-01-26 23:38 ` Dave Chinner 2021-01-28 0:46 ` Nicolas Boichat 2021-01-28 5:57 ` Darrick J. Wong 2021-02-12 4:48 ` Nicolas Boichat [this message] 2021-01-26 23:50 ` Al Viro
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='CANMq1KCcSZL=_CC2r2Yv8e_p7JY9RKgJ1kSVMrCAO0ZokSupeg@mail.gmail.com' \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH] fs: generic_copy_file_checks: Do not adjust count based on file size' \ /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
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).