Re: [PATCH 4/7] swapon(2): open swap with O_EXCL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 28, 2024 at 11:46:05AM -0700, Linus Torvalds wrote:
> On Sun, 28 Apr 2024 at 11:19, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > FWIW, pretty much the same can be done with zram - open with O_EXCL and to
> > hell with reopening.  Guys, are there any objections to that?
> 
> Please do. The fewer of these strange "re-open block device" things we
> have, the better.
> 
> I particularly dislike our "holder" logic, and this re-opening is one
> source of nasty confusion, and if we could replace them all with just
> the "O_EXCL uses the file itself as the holder", that would be
> absolutely _lovely_.

The tricky part is blk_holder_ops, and I'm no fonder of it than you are.

Christoph, do you have any plans along those lines for swap devices?
If they are not going to grow holder_ops, I'd say we should switch
to O_EXCL open and be done with that; zram is in the same situation,
AFAICS.

Might be worth a topic at LSF, actually...




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux