Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1362343 > unrolled thread

[PATCH 5/8] fs: xfs: replace BIO_MAX_SECTORS with BIO_MAX_PAGES

Started byMing Lei <ming.lei@canonical.com>
First post2016-03-22 07:20 +0100
Last post2016-03-29 09:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 5/8] fs: xfs: replace BIO_MAX_SECTORS with BIO_MAX_PAGES Ming Lei <ming.lei@canonical.com> - 2016-03-22 07:20 +0100
    Re: [PATCH 5/8] fs: xfs: replace BIO_MAX_SECTORS with BIO_MAX_PAGES Christoph Hellwig <hch@infradead.org> - 2016-03-29 09:30 +0200

#1362343 — [PATCH 5/8] fs: xfs: replace BIO_MAX_SECTORS with BIO_MAX_PAGES

FromMing Lei <ming.lei@canonical.com>
Date2016-03-22 07:20 +0100
Subject[PATCH 5/8] fs: xfs: replace BIO_MAX_SECTORS with BIO_MAX_PAGES
Message-ID<rfnPA-qn-19@gated-at.bofh.it>
BIO_MAX_PAGES is used as maximum count of bvecs, so
replace BIO_MAX_SECTORS with BIO_MAX_PAGES since
BIO_MAX_SECTORS is to be removed.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 fs/xfs/xfs_buf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 9a2191b..01ef6d2 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1161,7 +1161,7 @@ xfs_buf_ioapply_map(
 
 next_chunk:
 	atomic_inc(&bp->b_io_remaining);
-	nr_pages = BIO_MAX_SECTORS >> (PAGE_SHIFT - BBSHIFT);
+	nr_pages = BIO_MAX_PAGES;
 	if (nr_pages > total_nr_pages)
 		nr_pages = total_nr_pages;
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1365929

FromChristoph Hellwig <hch@infradead.org>
Date2016-03-29 09:30 +0200
Message-ID<rhWga-2Ka-3@gated-at.bofh.it>
In reply to#1362343
> +	nr_pages = BIO_MAX_PAGES;
>  	if (nr_pages > total_nr_pages)
>  		nr_pages = total_nr_pages;

Looks reasonable, but the whole thing could simply become:

	nr_pages = min(total_nr_pages, BIO_MAX_PAGES);

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web