Re: [PATCH 2/2] dm-bdev-keep-bdev-always-referenced.patch

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

 



Mikulas Patocka wrote:
> @@ -1280,8 +1284,7 @@ static int __bind(struct mapped_device *
>  	if (size != get_capacity(md->disk))
>  		memset(&md->geometry, 0, sizeof(md->geometry));
>  
> -	if (md->bdev)
> -		__set_size(md, size);
> +	__set_size(md, size);
>  
>  	if (!size) {
>  		dm_table_destroy(t);
> @@ -1523,11 +1526,6 @@ int dm_swap_table(struct mapped_device *
>  	if (!dm_suspended(md))
>  		goto out;
>  
> -	/* without bdev, the device size cannot be changed */
> -	if (!md->bdev)
> -		if (get_capacity(md->disk) != dm_table_get_size(table))
> -			goto out;
> -
>  	__unbind(md);
>  	r = __bind(md, table);

When the device is suspended with noflush,
can __set_size() wait forever on i_mutex
if somebody is waiting for I/O flushing with i_mutex held (e.g. fsync)?

md->bdev was also used as a marker to tell whether the device was
suspended with noflush.
Sorry, the original comment in the code was perhaps not adequate.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux