All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm 0/2] nilfs2 minor changes
@ 2017-01-23 15:17 Ryusuke Konishi
  2017-01-23 15:17 ` [PATCH -mm 1/2] nilfs2: use nilfs_btree_node_size() Ryusuke Konishi
  2017-01-23 15:17 ` [PATCH -mm 2/2] nilfs2: use i_blocksize() Ryusuke Konishi
  0 siblings, 2 replies; 3+ messages in thread
From: Ryusuke Konishi @ 2017-01-23 15:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, linux-nilfs, Geliang Tang, Ryusuke Konishi

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(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH -mm 1/2] nilfs2: use nilfs_btree_node_size()
  2017-01-23 15:17 [PATCH -mm 0/2] nilfs2 minor changes Ryusuke Konishi
@ 2017-01-23 15:17 ` Ryusuke Konishi
  2017-01-23 15:17 ` [PATCH -mm 2/2] nilfs2: use i_blocksize() Ryusuke Konishi
  1 sibling, 0 replies; 3+ messages in thread
From: Ryusuke Konishi @ 2017-01-23 15:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, linux-nilfs, Geliang Tang, Ryusuke Konishi

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH -mm 2/2] nilfs2: use i_blocksize()
  2017-01-23 15:17 [PATCH -mm 0/2] nilfs2 minor changes Ryusuke Konishi
  2017-01-23 15:17 ` [PATCH -mm 1/2] nilfs2: use nilfs_btree_node_size() Ryusuke Konishi
@ 2017-01-23 15:17 ` Ryusuke Konishi
  1 sibling, 0 replies; 3+ messages in thread
From: Ryusuke Konishi @ 2017-01-23 15:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, linux-nilfs, Geliang Tang, Ryusuke Konishi

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-23 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 15:17 [PATCH -mm 0/2] nilfs2 minor changes Ryusuke Konishi
2017-01-23 15:17 ` [PATCH -mm 1/2] nilfs2: use nilfs_btree_node_size() Ryusuke Konishi
2017-01-23 15:17 ` [PATCH -mm 2/2] nilfs2: use i_blocksize() Ryusuke Konishi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.