Re: [PATCH] mm: Removing the card during write

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

 



On Mon, Jul 28, 2025 at 07:13:06AM -0700, laishangzhen wrote:
> When formatting an SD card to ext4 using mkfs.ext4,
> if the card is ejected during the process,
> the formatting process blocks at
> balance_dirty_pages_ratelimited.

You're fixing this in the wrong place; it should be in mm/page-writeback.c
somewhere.

But it really needs a more thorough analysis than this.  To date we do
not handle removable media well.  I wrote up a proposal in 2018 here:
http://www.wil.cx/~willy/banbury.html but I haven't done any work
towards it.

You're proposing an entirely different approach which is to just,
well, kill applications.  This leaves pages in the page cache which are
effectively leaked.  If we continue on this path, we'd also want a way to
release all the pages in the page cache associated with this block device.
And that's a harder problem than you might think.




[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