From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
"Besogonov, Aleksei" <cyberax@amazon.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
xfs <linux-xfs@vger.kernel.org>
Subject: Re: fallocate on XFS for swap
Date: Tue, 13 Mar 2018 00:14:40 -0700 [thread overview]
Message-ID: <20180313071440.GA23797@infradead.org> (raw)
In-Reply-To: <20180312214626.GZ18129@dastard>
On Tue, Mar 13, 2018 at 08:46:26AM +1100, Dave Chinner wrote:
> > So maybe we want a layout based swap code instead of reinventing it,
> > with the slight twist to the layout break code to never try a lease
> > break and just return an error for the IS_SWAPFILE case.
>
> Hmmm - won't that change user visible behaviour on swapfiles? Not
> that it would be a bad thing to reject read/write from root on swap
> files, but it would make XFS different to everything else.
We already can't writew to active swap files, thank god:
root@testvm:~# dd if=/dev/zero of=swapfile bs=1M count=64
64+0 records in
64+0 records out
67108864 bytes (67 MB, 64 MiB) copied, 0.0458446 s, 1.5 GB/s
mkswap swapfile
mkswap: swapfile: insecure permissions 0644, 0600 suggested.
Setting up swapspace version 1, size = 64 MiB (67104768 bytes)
no label, UUID=bb42b883-f224-4627-8580-c1ba9f4569ab
root@testvm:~# swapon swapfile
swapon: /root/swapfile: insecure permissions 0644, 0600 suggested.
[ 54.165439] Adding 65532k swap on /root/swapfile. Priority:-2 extents:1 across:65532k
root@testvm:~# dd if=/dev/zero of=swapfile bs=1M count=64
dd: failed to open 'swapfile': Text file busy
>
> Speaking of which - we probably need to spend some time at LSFMM in
> the fs track talking about the iomap infrastructure and long term
> plans to migrate the major filesystems to it....
I won't be there, as I'll be busy working the local election ballot.
next prev parent reply other threads:[~2018-03-13 7:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 22:05 fallocate on XFS for swap Besogonov, Aleksei
2018-03-09 23:44 ` Darrick J. Wong
2018-03-09 23:44 ` Darrick J. Wong
2018-03-10 0:58 ` Dave Chinner
2018-03-10 0:58 ` Dave Chinner
2018-03-10 1:17 ` Darrick J. Wong
2018-03-10 1:17 ` Darrick J. Wong
2018-03-10 1:36 ` Dave Chinner
2018-03-10 1:36 ` Dave Chinner
2018-03-12 22:01 ` Besogonov, Aleksei
2018-03-13 1:31 ` Dave Chinner
2018-03-10 9:38 ` Christoph Hellwig
2018-03-12 21:46 ` Dave Chinner
2018-03-13 7:14 ` Christoph Hellwig [this message]
2018-03-12 18:40 ` Besogonov, Aleksei
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=20180313071440.GA23797@infradead.org \
--to=hch@infradead.org \
--cc=cyberax@amazon.com \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.