Re: [PATCH v2] loop: fix zero sized loop for block special file

From: Jens Axboe
Date: Mon Aug 25 2025 - 09:55:10 EST



On Mon, 25 Aug 2025 17:32:05 +0800, Yu Kuai wrote:
> By default, /dev/sda is block specail file from devtmpfs, getattr will
> return file size as zero, causing loop failed for raw block device.
>
> We can add bdev_statx() to return device size, however this may introduce
> changes that are not acknowledged by user. Fix this problem by reverting
> changes for block special file, file mapping host is set to bdev inode
> while opening, and use i_size_read() directly to get device size.
>
> [...]

Applied, thanks!

[1/1] loop: fix zero sized loop for block special file
commit: d14469ed7c00314fe8957b2841bda329e4eaf4ab

Best regards,
--
Jens Axboe