]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'dax-misc-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 02:34:26 +0000 (19:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 02:34:26 +0000 (19:34 -0700)
Pull misc DAX updates from Vishal Verma:
 "DAX error handling for 4.7

   - Until now, dax has been disabled if media errors were found on any
     device.  This enables the use of DAX in the presence of these
     errors by making all sector-aligned zeroing go through the driver.

   - The driver (already) has the ability to clear errors on writes that
     are sent through the block layer using 'DSMs' defined in ACPI 6.1.

  Other misc changes:

   - When mounting DAX filesystems, check to make sure the partition is
     page aligned.  This is a requirement for DAX, and previously, we
     allowed such unaligned mounts to succeed, but subsequent
     reads/writes would fail.

   - Misc/cleanup fixes from Jan that remove unused code from DAX
     related to zeroing, writeback, and some size checks"

* tag 'dax-misc-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  dax: fix a comment in dax_zero_page_range and dax_truncate_page
  dax: for truncate/hole-punch, do zeroing through the driver if possible
  dax: export a low-level __dax_zero_page_range helper
  dax: use sb_issue_zerout instead of calling dax_clear_sectors
  dax: enable dax in the presence of known media errors (badblocks)
  dax: fallback from pmd to pte on error
  block: Update blkdev_dax_capable() for consistency
  xfs: Add alignment check for DAX mount
  ext2: Add alignment check for DAX mount
  ext4: Add alignment check for DAX mount
  block: Add bdev_dax_supported() for dax mount checks
  block: Add vfs_msg() interface
  dax: Remove redundant inode size checks
  dax: Remove pointless writeback from dax_do_io()
  dax: Remove zeroing from dax_io()
  dax: Remove dead zeroing code from fault handlers
  ext2: Avoid DAX zeroing to corrupt data
  ext2: Fix block zeroing in ext2_get_blocks() for DAX
  dax: Remove complete_unwritten argument
  DAX: move RADIX_DAX_ definitions to dax.c

13 files changed:
1  2 
block/ioctl.c
drivers/nvdimm/pmem.c
drivers/s390/block/dcssblk.c
fs/block_dev.c
fs/dax.c
fs/ext2/inode.c
fs/ext4/file.c
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_file.c
fs/xfs/xfs_super.c
include/linux/blkdev.h
include/linux/dax.h
include/linux/fs.h

diff --cc block/ioctl.c
Simple merge
index 042baec569319bcd6539212bf7b2e123b51e7e3a,c447579bd853cfccd55303fb3d623435b6d965ab..608fc4464574e1d9edb4037c53b6998afdb11ebe
@@@ -164,11 -182,13 +164,13 @@@ static int pmem_rw_page(struct block_de
  }
  
  static long pmem_direct_access(struct block_device *bdev, sector_t sector,
-                     void __pmem **kaddr, pfn_t *pfn)
+                     void __pmem **kaddr, pfn_t *pfn, long size)
  {
 -      struct pmem_device *pmem = bdev->bd_disk->private_data;
 +      struct pmem_device *pmem = bdev->bd_queue->queuedata;
        resource_size_t offset = sector * 512 + pmem->data_offset;
  
+       if (unlikely(is_bad_pmem(&pmem->bb, sector, size)))
+               return -EIO;
        *kaddr = pmem->virt_addr + offset;
        *pfn = phys_to_pfn_t(pmem->phys_addr + offset, pmem->pfn_flags);
  
Simple merge
diff --cc fs/block_dev.c
Simple merge
diff --cc fs/dax.c
Simple merge
diff --cc fs/ext2/inode.c
Simple merge
diff --cc fs/ext4/file.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 982a6c4a62f3643e12ae6182e37544acd2b0c05f,90fbc99e531341d39000badf201474284737aea1..7743e51f826c8bcd65ff5d3f777435d81f85d08a
@@@ -5,15 -5,12 +5,12 @@@
  #include <linux/mm.h>
  #include <asm/pgtable.h>
  
 -ssize_t dax_do_io(struct kiocb *, struct inode *, struct iov_iter *, loff_t,
 +ssize_t dax_do_io(struct kiocb *, struct inode *, struct iov_iter *,
                  get_block_t, dio_iodone_t, int flags);
- int dax_clear_sectors(struct block_device *bdev, sector_t _sector, long _size);
  int dax_zero_page_range(struct inode *, loff_t from, unsigned len, get_block_t);
  int dax_truncate_page(struct inode *, loff_t from, get_block_t);
- int dax_fault(struct vm_area_struct *, struct vm_fault *, get_block_t,
-               dax_iodone_t);
- int __dax_fault(struct vm_area_struct *, struct vm_fault *, get_block_t,
-               dax_iodone_t);
+ int dax_fault(struct vm_area_struct *, struct vm_fault *, get_block_t);
+ int __dax_fault(struct vm_area_struct *, struct vm_fault *, get_block_t);
  
  #ifdef CONFIG_FS_DAX
  struct page *read_dax_sector(struct block_device *bdev, sector_t n);
Simple merge