From: Jens Axboe <axboe@kernel.dk>
To: Anthony Iliopoulos <ailiop@suse.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>,
akpm@linux-foundation.org
Subject: Re: [PATCH] swap: fix swapfile read/write offset
Date: Wed, 3 Mar 2021 09:24:13 -0700 [thread overview]
Message-ID: <910b8b56-e16d-ec91-5e76-c88cac69d89b@kernel.dk> (raw)
In-Reply-To: <YD+vZW2bJsmpCGn5@technoir>
On 3/3/21 8:46 AM, Anthony Iliopoulos wrote:
> On Tue, Mar 02, 2021 at 03:36:19PM -0700, Jens Axboe wrote:
>> We're not factoring in the start of the file for where to write and
>> read the swapfile, which leads to very unfortunate side effects of
>> writing where we should not be...
>>
>> Fixes: 48d15436fde6 ("mm: remove get_swap_bio")
>
> Presumably the usage of swap_page_sector was already affecting swap on
> blockdevs that implement rw_page (currently brd, zram, btt, pmem), so it
> may worth adding:
>
> Fixes: dd6bd0d9c7db ("swap: use bdev_read_page() / bdev_write_page()")
> Cc: <stable@vger.kernel.org> # v3.16+
>
> for backporting, since it also affects stable.
yes indeed, in fact that is the source of the original issue (copy/paste
from that broken path).
Fix is already upstream, but would be nice if someone would turn it into
something that could be applied to stable.
--
Jens Axboe
next prev parent reply other threads:[~2021-03-03 16:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6f9da9c6-c6c5-08fe-95ea-940954456c40@kernel.dk>
2021-03-03 15:46 ` Anthony Iliopoulos
2021-03-03 16:24 ` Jens Axboe [this message]
2021-03-04 3:19 ` Anthony Iliopoulos
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=910b8b56-e16d-ec91-5e76-c88cac69d89b@kernel.dk \
--to=axboe@kernel.dk \
--cc=ailiop@suse.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox