Skip to contentSkip to conversation

linux-next: manual merge of the block tree with the f2fs tree

DISCUSSION Stephen Rothwell 2 participants 5 messages Dec 3, 2020 – Dec 17, 2020 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the block tree got conflicts in:

fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/super.c

between commit:

5c0602188dc7 ("f2fs: fix kbytes written stat for multi-device case")

from the f2fs tree and commits:

8446fe9255be ("block: switch partition lookup to use struct block_device") 9499ffc75217 ("f2fs: remove a few bd_part checks")

from the block tree.

I fixed it up (I think, see below, fs/f2fs/f2fs.h and fs/f2fs/super.c used the versions from the f2fs tree) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 44 lines
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/checkpoint.c
index 14ba1519639e,54a1905af052..000000000000
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@@ -1385,27 -1385,6 +1385,26 @@@ static void commit_checkpoint(struct f2
  	f2fs_submit_merged_write(sbi, META_FLUSH);
  }
  
 +static inline u64 get_sectors_written(struct block_device *bdev)
 +{
- 	return bdev->bd_part ?
- 		(u64)part_stat_read(bdev->bd_part, sectors[STAT_WRITE]) : 0;
++	return (u64)part_stat_read(bdev, sectors[STAT_WRITE]) : 0;
 +}
 +
 +u64 f2fs_get_sectors_written(struct f2fs_sb_info *sbi)
 +{
 +	if (f2fs_is_multi_device(sbi)) {
 +		u64 sectors = 0;
 +		int i;
 +
 +		for (i = 0; i < sbi->s_ndevs; i++)
 +			sectors += get_sectors_written(FDEV(i).bdev);
 +
 +		return sectors;
 +	}
 +
 +	return get_sectors_written(sbi->sb->s_bdev);
 +}
 +
  static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
  {
  	struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
diff --cc fs/f2fs/f2fs.h
index 5cd1b9f7cc53,49681a8d2b14..000000000000
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
diff --cc fs/f2fs/super.c
index 47858e0c5e95,af9f449da64b..000000000000
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
#1 lore raw
Quoted 19 lines · Stephen Rothwell

Hi all,

Today's linux-next merge of the block tree got conflicts in:

   fs/f2fs/checkpoint.c
   fs/f2fs/f2fs.h
   fs/f2fs/super.c

between commit:

5c0602188dc7 ("f2fs: fix kbytes written stat for multi-device case")

from the f2fs tree and commits:

8446fe9255be ("block: switch partition lookup to use struct block_device") 9499ffc75217 ("f2fs: remove a few bd_part checks")

from the block tree.

Quoted 8 lines

I fixed it up (I think, see below, fs/f2fs/f2fs.h and fs/f2fs/super.c used the versions from the f2fs tree) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

The fix looks good to me. :)

Thanks,

#2 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 6 lines · On Thu, 3 Dec 2020 14:43:48 +1100 Stephen Rothwell <[email protected]> wrote:
fs/f2fs/checkpoint.c +0 -0
diff --cc fs/f2fs/checkpoint.c
index 14ba1519639e,54a1905af052..000000000000

fs/f2fs/checkpoint.c

Quoted 8 lines
fs/f2fs/checkpoint.c +1 -2
@@@ -1385,27 -1385,6 +1385,26 @@@ static void commit_checkpoint(struct f2
  	f2fs_submit_merged_write(sbi, META_FLUSH);
  }
 
 +static inline u64 get_sectors_written(struct block_device *bdev)
 +{
- 	return bdev->bd_part ?
- 		(u64)part_stat_read(bdev->bd_part, sectors[STAT_WRITE]) : 0;
++	return (u64)part_stat_read(bdev, sectors[STAT_WRITE]) : 0;
                                                             ^^^^

Clearly, that should have been removed - I have done that now.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 35 lines · On Thu, 3 Dec 2020 14:43:48 +1100 Stephen Rothwell <[email protected]> wrote:

Today's linux-next merge of the block tree got conflicts in:

fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/super.c

between commit:

5c0602188dc7 ("f2fs: fix kbytes written stat for multi-device case")

from the f2fs tree and commits:

8446fe9255be ("block: switch partition lookup to use struct block_device") 9499ffc75217 ("f2fs: remove a few bd_part checks")

from the block tree.

I fixed it up (I think, see below, fs/f2fs/f2fs.h and fs/f2fs/super.c used the versions from the f2fs tree) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 2 lines
Cheers,
Stephen Rothwell
fs/f2fs/checkpoint.c +0 -0
diff --cc fs/f2fs/checkpoint.c
index 14ba1519639e,54a1905af052..000000000000

fs/f2fs/checkpoint.c

Quoted 8 lines
fs/f2fs/checkpoint.c +1 -2
@@@ -1385,27 -1385,6 +1385,26 @@@ static void commit_checkpoint(struct f2
  	f2fs_submit_merged_write(sbi, META_FLUSH);
  }
 
 +static inline u64 get_sectors_written(struct block_device *bdev)
 +{
- 	return bdev->bd_part ?
- 		(u64)part_stat_read(bdev->bd_part, sectors[STAT_WRITE]) : 0;
++	return (u64)part_stat_read(bdev, sectors[STAT_WRITE]) : 0;
                                                             ^^^^

With this rmeoved.

fs/f2fs/super.c

Quoted 28 lines

+}
+
+u64 f2fs_get_sectors_written(struct f2fs_sb_info *sbi)
+{
+ if (f2fs_is_multi_device(sbi)) {
+ u64 sectors = 0;
+ int i;
+
+ for (i = 0; i < sbi->s_ndevs; i++)
+ sectors += get_sectors_written(FDEV(i).bdev);
+
+ return sectors;
+ }
+
+ return get_sectors_written(sbi->sb->s_bdev);
+}
+
static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) {
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);

fs/f2fs/f2fs.h +0 -0
diff --cc fs/f2fs/f2fs.h
index 5cd1b9f7cc53,49681a8d2b14..000000000000
fs/f2fs/super.c +0 -0
diff --cc fs/f2fs/super.c
index 47858e0c5e95,af9f449da64b..000000000000

Just a reminder that the above conflict still exists.

Signature · 2 lines
Cheers,
Stephen Rothwell
#4 lore raw

Hi all,

Quoted 67 lines · On Tue, 15 Dec 2020 07:12:12 +1100 Stephen Rothwell <[email protected]>…
Quoted 32 lines · On Thu, 3 Dec 2020 14:43:48 +1100 Stephen Rothwell <[email protected]> wrote:

Today's linux-next merge of the block tree got conflicts in:

fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/super.c

between commit:

5c0602188dc7 ("f2fs: fix kbytes written stat for multi-device case")

from the f2fs tree and commits:

8446fe9255be ("block: switch partition lookup to use struct block_device") 9499ffc75217 ("f2fs: remove a few bd_part checks")

from the block tree.

I fixed it up (I think, see below, fs/f2fs/f2fs.h and fs/f2fs/super.c used the versions from the f2fs tree) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

fs/f2fs/checkpoint.c +0 -0
diff --cc fs/f2fs/checkpoint.c
index 14ba1519639e,54a1905af052..000000000000

fs/f2fs/checkpoint.c

Quoted 8 lines
fs/f2fs/checkpoint.c +1 -2
@@@ -1385,27 -1385,6 +1385,26 @@@ static void commit_checkpoint(struct f2
  	f2fs_submit_merged_write(sbi, META_FLUSH);
  }
 
 +static inline u64 get_sectors_written(struct block_device *bdev)
 +{
- 	return bdev->bd_part ?
- 		(u64)part_stat_read(bdev->bd_part, sectors[STAT_WRITE]) : 0;
++	return (u64)part_stat_read(bdev, sectors[STAT_WRITE]) : 0;  
                                                             ^^^^

With this removed.

Quoted 22 lines

+}
+
+u64 f2fs_get_sectors_written(struct f2fs_sb_info *sbi)
+{
+ if (f2fs_is_multi_device(sbi)) {
+ u64 sectors = 0;
+ int i;
+
+ for (i = 0; i < sbi->s_ndevs; i++)
+ sectors += get_sectors_written(FDEV(i).bdev);
+
+ return sectors;
+ }
+
+ return get_sectors_written(sbi->sb->s_bdev);
+}
+
static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) {
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);

fs/f2fs/f2fs.h +0 -0
diff --cc fs/f2fs/f2fs.h
index 5cd1b9f7cc53,49681a8d2b14..000000000000
Quoted 8 lines

fs/f2fs/super.c

Quoted 6 lines
fs/f2fs/f2fs.h +0 -0
fs/f2fs/super.c +0 -0
diff --cc fs/f2fs/super.c
index 47858e0c5e95,af9f449da64b..000000000000

Just a reminder that the above conflict still exists.

This is now a conflict between the f2fs tree and Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell