On 27.04.2018 11:22, Gu Jinxiang wrote: > In btrfs_shrink_device, before btrfs_search_slot, path->reada is > set to READA_FORWARD. But I think READA_BACK is correct. > Since, > 1.key.offset is set to (u64)-1 > 2.After btrfs_search_slot, btrfs_previous_item is called. > So, for readahead previous items, READA_BACK is correct one.
My analysis arrives at the same conclusions so: Reviewed-by: Nikolay Borisov <nbori...@suse.com> > > Signed-off-by: Gu Jinxiang <g...@cn.fujitsu.com> > --- > fs/btrfs/volumes.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c > index 292266f6ab9c..1a3506a3003d 100644 > --- a/fs/btrfs/volumes.c > +++ b/fs/btrfs/volumes.c > @@ -4473,7 +4473,7 @@ int btrfs_shrink_device(struct btrfs_device *device, > u64 new_size) > if (!path) > return -ENOMEM; > > - path->reada = READA_FORWARD; > + path->reada = READA_BACK; > > mutex_lock(&fs_info->chunk_mutex); > > -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html