mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
libnvdimm for 4.14
* Media error handling support in the Block Translation Table (BTT)
driver is reworked to address sleeping-while-atomic locking and
memory-allocation-context conflicts.
* The dax_device lookup overhead for xfs and ext4 is moved out of the
iomap hot-path to a mount-time lookup.
* A new 'ecc_unit_size' sysfs attribute is added to advertise the
read-modify-write boundary property of a persistent memory range.
* Preparatory fix-ups for arm and powerpc pmem support are included
along with other miscellaneous fixes.
-----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJZtsAGAAoJEB7SkWpmfYgCrzMP/2vPvZvrFjZn5pAoZjlmTmHM
ySceoOC7vwvVXIsSs52FhSjcxEoXo9cklXPwhXOPVtVUFdSDJBUOIUxwIziE6Y+5
sFJ2xT9K+5zKBUiXJwqFQDg52dn//eBNnnnDz+HQrBSzGrbWQhIZY2m19omPzv1I
BeN0OCGOdW3cjSo3BCFl1d+KrSl704e7paeKq/TO3GIiAilIXleTVxcefEEodV2K
ZvWHpFIhHeyN8dsF8teI952KcCT92CT/IaabxQIwCxX0/8/GFeDc5aqf77qiYWKi
uxCeQXdgnaE8EZNWZWGWIWul6eYEkoCNbLeUQ7eJnECq61VxVajJS0NyGa5T9OiM
P046Bo2b1b3R0IHxVIyVG0ZCm3YUMAHSn/3uRxPgESJ4bS/VQ3YP5M6MLxDOlc90
IisLilagitkK6h8/fVuVrwciRNQ71XEC34t6k7GCl/1ZnLlLT+i4/jc5NRZnGEZh
aXAAGHdteQ+/mSz6p2UISFUekbd6LerwzKRw8ibDvH6pTud8orYR7g2+JoGhgb6Y
pyFVE8DhIcqNKAMxBsjiRZ46OQ7qrT+AemdAG3aVv6FaNoe4o5jPLdw2cEtLqtpk
+DNm0/lSWxxxozjrvu6EUZj6hk8R5E19XpRzV5QJkcKUXMu7oSrFLdMcC4FeIjl9
K4hXLV3fVBVRMiS0RA6z
=5iGY
-----END PGP SIGNATURE-----
Merge tag 'libnvdimm-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm from Dan Williams:
"A rework of media error handling in the BTT driver and other updates.
It has appeared in a few -next releases and collected some late-
breaking build-error and warning fixups as a result.
Summary:
- Media error handling support in the Block Translation Table (BTT)
driver is reworked to address sleeping-while-atomic locking and
memory-allocation-context conflicts.
- The dax_device lookup overhead for xfs and ext4 is moved out of the
iomap hot-path to a mount-time lookup.
- A new 'ecc_unit_size' sysfs attribute is added to advertise the
read-modify-write boundary property of a persistent memory range.
- Preparatory fix-ups for arm and powerpc pmem support are included
along with other miscellaneous fixes"
* tag 'libnvdimm-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (26 commits)
libnvdimm, btt: fix format string warnings
libnvdimm, btt: clean up warning and error messages
ext4: fix null pointer dereference on sbi
libnvdimm, nfit: move the check on nd_reserved2 to the endpoint
dax: fix FS_DAX=n BLOCK=y compilation
libnvdimm: fix integer overflow static analysis warning
libnvdimm, nd_blk: remove mmio_flush_range()
libnvdimm, btt: rework error clearing
libnvdimm: fix potential deadlock while clearing errors
libnvdimm, btt: cache sector_size in arena_info
libnvdimm, btt: ensure that flags were also unchanged during a map_read
libnvdimm, btt: refactor map entry operations with macros
libnvdimm, btt: fix a missed NVDIMM_IO_ATOMIC case in the write path
libnvdimm, nfit: export an 'ecc_unit_size' sysfs attribute
ext4: perform dax_device lookup at mount
ext2: perform dax_device lookup at mount
xfs: perform dax_device lookup at mount
dax: introduce a fs_dax_get_by_bdev() helper
libnvdimm, btt: check memory allocation failure
libnvdimm, label: fix index block size calculation
...
This commit is contained in:
commit
89fd915c40
33 changed files with 397 additions and 170 deletions
|
|
@ -114,6 +114,7 @@ struct ext2_sb_info {
|
|||
*/
|
||||
spinlock_t s_lock;
|
||||
struct mb_cache *s_ea_block_cache;
|
||||
struct dax_device *s_daxdev;
|
||||
};
|
||||
|
||||
static inline spinlock_t *
|
||||
|
|
|
|||
|
|
@ -800,10 +800,10 @@ int ext2_get_block(struct inode *inode, sector_t iblock,
|
|||
static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
|
||||
unsigned flags, struct iomap *iomap)
|
||||
{
|
||||
struct block_device *bdev;
|
||||
unsigned int blkbits = inode->i_blkbits;
|
||||
unsigned long first_block = offset >> blkbits;
|
||||
unsigned long max_blocks = (length + (1 << blkbits) - 1) >> blkbits;
|
||||
struct ext2_sb_info *sbi = EXT2_SB(inode->i_sb);
|
||||
bool new = false, boundary = false;
|
||||
u32 bno;
|
||||
int ret;
|
||||
|
|
@ -814,13 +814,9 @@ static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
|
|||
return ret;
|
||||
|
||||
iomap->flags = 0;
|
||||
bdev = inode->i_sb->s_bdev;
|
||||
iomap->bdev = bdev;
|
||||
iomap->bdev = inode->i_sb->s_bdev;
|
||||
iomap->offset = (u64)first_block << blkbits;
|
||||
if (blk_queue_dax(bdev->bd_queue))
|
||||
iomap->dax_dev = fs_dax_get_by_host(bdev->bd_disk->disk_name);
|
||||
else
|
||||
iomap->dax_dev = NULL;
|
||||
iomap->dax_dev = sbi->s_daxdev;
|
||||
|
||||
if (ret == 0) {
|
||||
iomap->type = IOMAP_HOLE;
|
||||
|
|
@ -842,7 +838,6 @@ static int
|
|||
ext2_iomap_end(struct inode *inode, loff_t offset, loff_t length,
|
||||
ssize_t written, unsigned flags, struct iomap *iomap)
|
||||
{
|
||||
fs_put_dax(iomap->dax_dev);
|
||||
if (iomap->type == IOMAP_MAPPED &&
|
||||
written < length &&
|
||||
(flags & IOMAP_WRITE))
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ static void ext2_put_super (struct super_block * sb)
|
|||
brelse (sbi->s_sbh);
|
||||
sb->s_fs_info = NULL;
|
||||
kfree(sbi->s_blockgroup_lock);
|
||||
fs_put_dax(sbi->s_daxdev);
|
||||
kfree(sbi);
|
||||
}
|
||||
|
||||
|
|
@ -813,6 +814,7 @@ static unsigned long descriptor_loc(struct super_block *sb,
|
|||
|
||||
static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
||||
{
|
||||
struct dax_device *dax_dev = fs_dax_get_by_bdev(sb->s_bdev);
|
||||
struct buffer_head * bh;
|
||||
struct ext2_sb_info * sbi;
|
||||
struct ext2_super_block * es;
|
||||
|
|
@ -842,6 +844,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
|||
}
|
||||
sb->s_fs_info = sbi;
|
||||
sbi->s_sb_block = sb_block;
|
||||
sbi->s_daxdev = dax_dev;
|
||||
|
||||
spin_lock_init(&sbi->s_lock);
|
||||
|
||||
|
|
@ -1200,6 +1203,7 @@ failed_sbi:
|
|||
kfree(sbi->s_blockgroup_lock);
|
||||
kfree(sbi);
|
||||
failed:
|
||||
fs_put_dax(dax_dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue