Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1395554 > unrolled thread
| Started by | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| First post | 2016-05-06 02:40 +0200 |
| Last post | 2016-05-09 10:40 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 4/5] ext2: Add alignment check for DAX mount Toshi Kani <toshi.kani@hpe.com> - 2016-05-06 02:40 +0200
Re: [PATCH v3 4/5] ext2: Add alignment check for DAX mount Christoph Hellwig <hch@infradead.org> - 2016-05-08 11:00 +0200
Re: [PATCH v3 4/5] ext2: Add alignment check for DAX mount Jan Kara <jack@suse.cz> - 2016-05-09 10:30 +0200
Re: [PATCH v3 4/5] ext2: Add alignment check for DAX mount Jan Kara <jack@suse.cz> - 2016-05-09 10:40 +0200
| From | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| Date | 2016-05-06 02:40 +0200 |
| Subject | [PATCH v3 4/5] ext2: Add alignment check for DAX mount |
| Message-ID | <rvBYh-2li-83@gated-at.bofh.it> |
When a partition is not aligned by 4KB, mount -o dax succeeds,
but any read/write access to the filesystem fails, except for
metadata update.
Call bdev_supports_dax() to perform proper precondition checks
which includes this partition alignment check.
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Boaz Harrosh <boaz@plexistor.com>
---
fs/ext2/super.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index b78caf2..7d63de4 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -922,16 +922,9 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
if (sbi->s_mount_opt & EXT2_MOUNT_DAX) {
- if (blocksize != PAGE_SIZE) {
- ext2_msg(sb, KERN_ERR,
- "error: unsupported blocksize for dax");
+ err = bdev_supports_dax(sb, blocksize);
+ if (err)
goto failed_mount;
- }
- if (!sb->s_bdev->bd_disk->fops->direct_access) {
- ext2_msg(sb, KERN_ERR,
- "error: device does not support dax");
- goto failed_mount;
- }
}
/* If the blocksize doesn't match, re-read the thing.. */
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2016-05-08 11:00 +0200 |
| Message-ID | <rwsJc-3ub-3@gated-at.bofh.it> |
| In reply to | #1395554 |
Not really for the patch, but given that we have the right people on CC: Do we really want to keep DAX support in ext2 in the long run? ext2 is missing a lot of the useful features for a modern FS, shouldn't we direct people to use ext4 (in non-journal mode if needed) if they want to use DAX? ext4 will even support the unmodified ext2 fs, so it shouldn't be a big hurdle, and it would avoid a lot of churn in ext2.
[toc] | [prev] | [next] | [standalone]
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Date | 2016-05-09 10:30 +0200 |
| Message-ID | <rwOJH-1qn-3@gated-at.bofh.it> |
| In reply to | #1396395 |
On Sun 08-05-16 01:59:37, Christoph Hellwig wrote: > Not really for the patch, but given that we have the right people > on CC: > > Do we really want to keep DAX support in ext2 in the long run? ext2 > is missing a lot of the useful features for a modern FS, shouldn't > we direct people to use ext4 (in non-journal mode if needed) if they > want to use DAX? ext4 will even support the unmodified ext2 fs, so it > shouldn't be a big hurdle, and it would avoid a lot of churn in ext2. I've heard concerns that embedded people use ext2 driver (due to smaller code size than ext4 - 1.7 MB object for ext2 vs over 7 MB object for ext4 in my build) including old XIP support. DAX has replaced the old XIP code so removing DAX from ext2 would be a regression for them - either they'd have to go with significantly larger module or without XIP. So for now I'd leave DAX in ext2. Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR
[toc] | [prev] | [next] | [standalone]
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Date | 2016-05-09 10:40 +0200 |
| Message-ID | <rwOTo-1x9-23@gated-at.bofh.it> |
| In reply to | #1395554 |
On Thu 05-05-16 18:29:55, Toshi Kani wrote: > When a partition is not aligned by 4KB, mount -o dax succeeds, > but any read/write access to the filesystem fails, except for > metadata update. > > Call bdev_supports_dax() to perform proper precondition checks > which includes this partition alignment check. > > Signed-off-by: Toshi Kani <toshi.kani@hpe.com> > Cc: Jan Kara <jack@suse.cz> > Cc: Dan Williams <dan.j.williams@intel.com> > Cc: Ross Zwisler <ross.zwisler@linux.intel.com> > Cc: Christoph Hellwig <hch@infradead.org> > Cc: Boaz Harrosh <boaz@plexistor.com> Looks good to me. Since this patch depends on the first two in your series, just feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> and merge it along with other patches. I've removed the ext2 patch from the previous version from my tree. Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web