Created
November 27, 2019 17:20
-
-
Save brtkwr/5fe95642a67b8f28139db953413b91b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/fs/dax.c b/fs/dax.c | |
| index 435f5b6..3a3be7d 100644 | |
| --- a/fs/dax.c | |
| +++ b/fs/dax.c | |
| @@ -976,8 +976,10 @@ int dax_writeback_mapping_range(struct address_space *mapping, | |
| int ret = 0; | |
| unsigned int scanned = 0; | |
| - if (WARN_ON_ONCE(inode->i_blkbits != PAGE_SHIFT)) | |
| + /*if (WARN_ON_ONCE(inode->i_blkbits != PAGE_SHIFT)) | |
| + printk("WARN_ON_ONCE() %i %i", inode->i_blkbits, PAGE_SHIFT); | |
| return -EIO; | |
| + */ | |
| if (!mapping->nrexceptional || wbc->sync_mode != WB_SYNC_ALL) | |
| return 0; | |
| diff --git a/fs/fuse/file.c b/fs/fuse/file.c | |
| index 794c551..f5ba426 100644 | |
| --- a/fs/fuse/file.c | |
| +++ b/fs/fuse/file.c | |
| @@ -2722,9 +2722,13 @@ static int fuse_dax_writepages(struct address_space *mapping, | |
| struct inode *inode = mapping->host; | |
| struct fuse_conn *fc = get_fuse_conn(inode); | |
| + int ret = 0; | |
| - return dax_writeback_mapping_range(mapping, | |
| + ret = dax_writeback_mapping_range(mapping, | |
| NULL, fc->dax_dev, wbc); | |
| + if (ret) | |
| + printk("dax_writeback_mapping_range() failed. err=%d", ret); | |
| + return ret; | |
| } | |
| static int fuse_writepages(struct address_space *mapping, | |
| diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c | |
| index 4871933..a63a8dd 100644 | |
| --- a/fs/fuse/inode.c | |
| +++ b/fs/fuse/inode.c | |
| @@ -1032,7 +1032,7 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req) | |
| max_t(unsigned int, arg->max_pages, 1)); | |
| } | |
| if ((arg->flags & FUSE_MAP_ALIGNMENT) && | |
| - (FUSE_DAX_MEM_RANGE_SZ % arg->map_alignment)) { | |
| + (FUSE_DAX_MEM_RANGE_SZ % (1UL << arg->map_alignment))) { | |
| printk(KERN_ERR "FUSE: map_alignment %u incompatible with dax mem range size %u\n", | |
| arg->map_alignment, | |
| FUSE_DAX_MEM_RANGE_SZ); | |
| diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h | |
| index ac23f57..dd6a382 100644 | |
| --- a/include/uapi/linux/fuse.h | |
| +++ b/include/uapi/linux/fuse.h | |
| @@ -274,7 +274,7 @@ struct fuse_file_lock { | |
| * FUSE_CACHE_SYMLINKS: cache READLINK responses | |
| * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir | |
| * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request | |
| - * FUSE_MAP_ALIGNMENT: init_out.map_alignment contains byte alignment for | |
| + * FUSE_MAP_ALIGNMENT: init_out.map_alignment contains log2(byte alignment) for | |
| * foffset and moffset fields in struct | |
| * fuse_setupmapping_out and fuse_removemapping_one. | |
| */ | |
| @@ -658,9 +658,8 @@ struct fuse_init_out { | |
| uint32_t max_write; | |
| uint32_t time_gran; | |
| uint16_t max_pages; | |
| - uint16_t padding; | |
| - uint32_t map_alignment; | |
| - uint32_t unused[7]; | |
| + uint16_t map_alignment; | |
| + uint32_t unused[8]; | |
| }; | |
| #define CUSE_INIT_INFO_MAX 4096 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment