Merge tag 'libnvdimm-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Sep 2021 18:39:57 +0000 (11:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Sep 2021 18:39:57 +0000 (11:39 -0700)
Pull libnvdimm updates from Dan Williams:

 - Fix a race condition in the teardown path of raw mode pmem
   namespaces.

 - Cleanup the code that filesystems use to detect filesystem-dax
   capabilities of their underlying block device.

* tag 'libnvdimm-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  dax: remove bdev_dax_supported
  xfs: factor out a xfs_buftarg_is_dax helper
  dax: stub out dax_supported for !CONFIG_FS_DAX
  dax: remove __generic_fsdax_supported
  dax: move the dax_read_lock() locking into dax_supported
  dax: mark dax_get_by_host static
  dm: use fs_dax_get_by_bdev instead of dax_get_by_host
  dax: stop using bdevname
  fsdax: improve the FS_DAX Kconfig description and help text
  libnvdimm/pmem: Fix crash triggered when I/O in-flight during unbind

1  2 
drivers/md/dm-table.c
drivers/md/dm.c
fs/Kconfig
fs/erofs/super.c
fs/ext2/super.c
fs/ext4/super.c
fs/xfs/xfs_super.c

Simple merge
diff --cc drivers/md/dm.c
Simple merge
diff --cc fs/Kconfig
Simple merge
@@@ -545,11 -500,6 +545,11 @@@ static int erofs_fc_fill_super(struct s
        if (err)
                return err;
  
-           !bdev_dax_supported(sb->s_bdev, EROFS_BLKSIZ)) {
 +      if (test_opt(ctx, DAX_ALWAYS) &&
++          !dax_supported(sbi->dax_dev, sb->s_bdev, EROFS_BLKSIZ, 0, bdev_nr_sectors(sb->s_bdev))) {
 +              errorfc(fc, "DAX unsupported by block device. Turning off DAX.");
 +              clear_opt(ctx, DAX_ALWAYS);
 +      }
        sb->s_flags |= SB_RDONLY | SB_NOATIME;
        sb->s_maxbytes = MAX_LFS_FILESIZE;
        sb->s_time_gran = 1;
diff --cc fs/ext2/super.c
Simple merge
diff --cc fs/ext4/super.c
Simple merge
@@@ -327,9 -311,18 +327,18 @@@ xfs_set_inode_alloc
                xfs_perag_put(pag);
        }
  
 -      return (mp->m_flags & XFS_MOUNT_32BITINODES) ? maxagi : agcount;
 +      return xfs_is_inode32(mp) ? maxagi : agcount;
  }
  
+ static bool
+ xfs_buftarg_is_dax(
+       struct super_block      *sb,
+       struct xfs_buftarg      *bt)
+ {
+       return dax_supported(bt->bt_daxdev, bt->bt_bdev, sb->s_blocksize, 0,
+                       bdev_nr_sectors(bt->bt_bdev));
+ }
  STATIC int
  xfs_blkdev_get(
        xfs_mount_t             *mp,