linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* virtio-blk/ext4 error handling for host-side ENOSPC
@ 2024-06-17  3:34 Keiichi Watanabe
  2024-06-18  8:33 ` Keiichi Watanabe
  0 siblings, 1 reply; 5+ messages in thread
From: Keiichi Watanabe @ 2024-06-17  3:34 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Junichi Uekawa, Takaya Saeki, tytso, Daniel Verkamp

Hi,

I'm using ext4 over virtio-blk for VMs, and I'd like to discuss the
situation where the host storage gets full.
Let's say you create a disk image file formatted with ext4 on the host
side as a sparse file and share it with the guest using virtio-blk.
When the host storage is full and the sparse file cannot be expanded
any further, the guest will know the error when it flushes disk
caches.
In the current implementation, the VMM's virtio-blk device returns
VIRTIO_BLK_S_IOERR, and the virtio-blk driver converts it to
BLK_STS_IOERR. Then, the ext4 module calls mapping_set_error for that
area.

However, the host's ENOSPC may be recoverable. For example, if a host
service periodically deletes cache files, it'd be nice if the guest
kernel can wait a while and then retry flushing.
So, I wonder if we can't have a special handling for host-side's
ENOSPC in virtio-blk and ext4.

My idea is like this:
First, (1) define a new error code, VIRTIO_BLK_S_ENOSPC, in
virtio-blk. Then, (2) if the guest file system receives this error
code, periodically retry flushing. We may want to make the retry limit
via a mount option or something.

What do you think of this idea? Also, has anything similar been attempted yet?
Thanks in advance.

Best,
Keiichi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-11  6:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17  3:34 virtio-blk/ext4 error handling for host-side ENOSPC Keiichi Watanabe
2024-06-18  8:33 ` Keiichi Watanabe
2024-06-19 13:57   ` Stefan Hajnoczi
2024-06-28  3:29     ` Keiichi Watanabe
2024-07-11  6:02       ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).