Re: [PATCH V19 05/19] Btrfs: subpage-blocksize: Read tree blocks whose size is < PAGE_SIZE

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

 



On Tue, Jun 14, 2016 at 12:41:02PM +0530, Chandan Rajendra wrote:
> In the case of subpage-blocksize, this patch makes it possible to read
> only a single metadata block from the disk instead of all the metadata
> blocks that map into a page.

This patch has a conflict with a next pending patch

"Btrfs: fix eb memory leak due to readpage failure"
https://patchwork.kernel.org/patch/9153927/

in this hunk:

> @@ -5557,10 +5645,32 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
>  		page = eb_head(eb)->pages[i];
>  		if (!PageUptodate(page)) {
>  			ClearPageError(page);
> -			err = __extent_read_full_page(tree, page,
> -						      get_extent, &bio,
> -						      mirror_num, &bio_flags,
> -						      READ | REQ_META);
> +			if (eb->len < PAGE_SIZE) {
> +				lock_extent_bits(tree, eb->start, eb->start + eb->len - 1,
> +							&cached_state);
> +				err = submit_extent_page(READ | REQ_META, tree,
> +							NULL, page,
> +							eb->start >> 9, eb->len,
> +							eb->start - page_offset(page),
> +							fs_info->fs_devices->latest_bdev,
> +							&bio, -1,
> +							end_bio_extent_buffer_readpage,
> +							mirror_num, bio_flags,
> +							bio_flags, false);
> +			} else {
> +				lock_extent_bits(tree, page_offset(page),
> +						page_offset(page) + PAGE_SIZE - 1,
> +						&cached_state);
> +				err = submit_extent_page(READ | REQ_META, tree,
> +							NULL, page,
> +							page_offset(page) >> 9,
> +							PAGE_SIZE, 0,
> +							fs_info->fs_devices->latest_bdev,
> +							&bio, -1,
> +							end_bio_extent_buffer_readpage,
> +							mirror_num, bio_flags,
> +							bio_flags, false);
> +			}
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux