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


Groups > linux.kernel > #1565050 > unrolled thread

[PATCH -mm 0/2] nilfs2 minor changes

Started byRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
First post2017-01-23 16:30 +0100
Last post2017-01-23 16:30 +0100
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH -mm 0/2] nilfs2 minor changes Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> - 2017-01-23 16:30 +0100
    [PATCH -mm 2/2] nilfs2: use i_blocksize() Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> - 2017-01-23 16:30 +0100
    [PATCH -mm 1/2] nilfs2: use nilfs_btree_node_size() Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> - 2017-01-23 16:30 +0100

#1565050 — [PATCH -mm 0/2] nilfs2 minor changes

FromRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Date2017-01-23 16:30 +0100
Subject[PATCH -mm 0/2] nilfs2 minor changes
Message-ID<t2OJc-885-5@gated-at.bofh.it>
Hi Andrew,

Please queue the following changes for the next merge window:

Geliang Tang (2):
      nilfs2: use nilfs_btree_node_size()
      nilfs2: use i_blocksize()

where "nilfs2: use i_blocksize()" requires the patch "fs: add
i_blocksize()" which resides in -mm tree.

Meanwhile "nilfs2: use nilfs_btree_node_size()" is applicable
independently.

Thanks,
Ryusuke Konishi
--
 fs/nilfs2/alloc.c | 2 +-
 fs/nilfs2/btree.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

[toc] | [next] | [standalone]


#1565051 — [PATCH -mm 2/2] nilfs2: use i_blocksize()

FromRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Date2017-01-23 16:30 +0100
Subject[PATCH -mm 2/2] nilfs2: use i_blocksize()
Message-ID<t2OJc-885-11@gated-at.bofh.it>
In reply to#1565050
From: Geliang Tang <geliangtang@gmail.com>

Since i_blocksize() helper has been defined in fs.h, use it instead
of open-coding.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
---
 fs/nilfs2/alloc.c | 2 +-
 fs/nilfs2/btree.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c
index 2c90e28..03b8ba9 100644
--- a/fs/nilfs2/alloc.c
+++ b/fs/nilfs2/alloc.c
@@ -34,7 +34,7 @@
 static inline unsigned long
 nilfs_palloc_groups_per_desc_block(const struct inode *inode)
 {
-	return (1UL << inode->i_blkbits) /
+	return i_blocksize(inode) /
 		sizeof(struct nilfs_palloc_group_desc);
 }
 
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index 9c7ea17..06ffa13 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -119,7 +119,7 @@ static int nilfs_btree_node_get_nchildren(const struct nilfs_btree_node *node)
 
 static int nilfs_btree_node_size(const struct nilfs_bmap *btree)
 {
-	return 1 << btree->b_inode->i_blkbits;
+	return i_blocksize(btree->b_inode);
 }
 
 static int nilfs_btree_nchildren_per_block(const struct nilfs_bmap *btree)
-- 
1.8.3.1

[toc] | [prev] | [next] | [standalone]


#1565056 — [PATCH -mm 1/2] nilfs2: use nilfs_btree_node_size()

FromRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Date2017-01-23 16:30 +0100
Subject[PATCH -mm 1/2] nilfs2: use nilfs_btree_node_size()
Message-ID<t2OJc-885-25@gated-at.bofh.it>
In reply to#1565050
From: Geliang Tang <geliangtang@gmail.com>

Use nilfs_btree_node_size() instead of open-coding.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
---
 fs/nilfs2/btree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index 2e315f9..9c7ea17 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -1870,7 +1870,7 @@ int nilfs_btree_convert_and_insert(struct nilfs_bmap *btree,
 		di = &dreq;
 		ni = NULL;
 	} else if ((n + 1) <= NILFS_BTREE_NODE_NCHILDREN_MAX(
-			   1 << btree->b_inode->i_blkbits)) {
+			   nilfs_btree_node_size(btree))) {
 		di = &dreq;
 		ni = &nreq;
 	} else {
-- 
1.8.3.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web