[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-block
Subject: Re: [PATCH 4/7] swapon(2): open swap with O_EXCL
From: Al Viro <viro () zeniv ! linux ! org ! uk>
Date: 2024-04-28 1:25:21
Message-ID: 20240428012521.GT2118490 () ZenIV
[Download RAW message or body]
On Sun, Apr 28, 2024 at 12:46:23AM +0100, Al Viro wrote:
> Switching swap exclusion to O_EXCL could've been done back in 2003 or
> at any later point; it's just that swapon(2)/swapoff(2) is something that
> rarely gets a look...
BTW, a fun archaeological question: at which point has this
/*
* Retrying may succeed; for example the folio may finish
* writeback, or buffers may be cleaned. This should not
* happen very often; maybe we have old buffers attached to
* this blockdev's page cache and we're trying to change
* the block size?
*/
if (!try_to_free_buffers(folio)) {
end_block = ~0ULL;
goto unlock;
}
in grow_dev_folio() (grow_dev_page() in earlier kernels) become unreachable?
I _think_ it was
commit fbc139f54fdb7edfec470421c2cc885d3796dfcd
Author: Linus Torvalds <torvalds@athlon.transmeta.com>
Date: Mon Feb 4 20:19:55 2002 -0800
v2.4.10.0.2 -> v2.4.10.0.3
- more buffers-in-pagecache coherency
when set_blocksize() started to do
sync_buffers(dev, 2);
...
invalidate_bdev(bdev, 1);
truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
at which point the "what if we'd found a page with attached buffers of the
wrong size?" should've become impossible.
Am I misreading that?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic