Messages in this thread | | | Subject | Re: [PATCH v3] loop: drop caches if offset or block_size are changed | From | Bart Van Assche <> | Date | Wed, 09 Jan 2019 12:51:28 -0800 |
| |
On Tue, 2018-12-18 at 14:41 -0800, Jaegeuk Kim wrote: > [ ... ]
Please post new versions of a patch as a new e-mail thread instead of as a reply to a previous e-mail.
> [ ... ] > > if (lo->lo_offset != info->lo_offset || > lo->lo_sizelimit != info->lo_sizelimit) { > + /* kill_bdev should have truncated all the pages */ > + if (lo->lo_device->bd_inode->i_mapping->nrpages) { > + err = -EAGAIN; > + goto exit; > + }
Please add a pr_info() or pr_warn() statement here such that it becomes easy for the user to figure out why EAGAIN has been returned.
> blk_mq_freeze_queue(lo->lo_queue); > > + /* kill_bdev should have truncated all the pages */ > + if (lo->lo_queue->limits.logical_block_size != arg && > + lo->lo_device->bd_inode->i_mapping->nrpages) { > + err = -EAGAIN; > + goto out; > + }
Same comment here. Additionally, please consider renaming the "out" label into "unfreeze" or so. I think that will make the use of label names more consistent with the rest of the block layer. Once these two comments are addressed, feel free to add:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
| |