Re: [PATCH 1/6] mm/fs: don't allow writes to immutable files

From: Theodore Ts'o
Date: Thu Jun 20 2019 - 20:56:06 EST


On Thu, Jun 20, 2019 at 03:13:06PM -0700, Darrick J. Wong wrote:
> > I note that this patch doesn't allow writes to swap files. So Amir's
> > generic/554 test will still fail for those file systems that don't use
> > copy_file_range.
>
> I didn't add any IS_SWAPFILE checks here, so I'm not sure to what you're
> referring?

Sorry, my bad; I mistyped. What I should have said is this patch
doesn't *prohibit* writes to swap files....

(And so Amir's generic/554 test, even modified so it allow reads from
swapfiles, but not writes, when using copy_file_range, is still
failing for ext4. I was looking to see if I could remove it from my
exclude list, but not yet. :-)

> > I'm indifferent as to whether you add a new patch, or include that
> > change in this patch, but perhaps we should fix this while we're
> > making changes in these code paths?
>
> The swapfile patches should be in a separate patch, which I was planning
> to work on but hadn't really gotten around to it.

Ok, great, thanks!!

- Ted