diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/sdfat/Kconfig | 14 | ||||
| -rw-r--r-- | fs/sdfat/misc.c | 9 | ||||
| -rw-r--r-- | fs/sdfat/mpage.c | 17 | ||||
| -rw-r--r-- | fs/sdfat/sdfat.c | 87 | ||||
| -rw-r--r-- | fs/sdfat/statistics.c | 38 | ||||
| -rw-r--r-- | fs/sdfat/version.h | 2 |
6 files changed, 101 insertions, 66 deletions
diff --git a/fs/sdfat/Kconfig b/fs/sdfat/Kconfig index bcaa7a1a3..3a15bbb55 100644 --- a/fs/sdfat/Kconfig +++ b/fs/sdfat/Kconfig @@ -1,5 +1,5 @@ config SDFAT_FS - tristate "sdFAT fs support" + tristate "sdFAT filesystem support" default y select NLS select NLS_UTF8 @@ -92,31 +92,31 @@ config SDFAT_SUPPORT_STLOG depends on SDFAT_FS && PROC_STLOG config SDFAT_DEBUG - bool "Enable debug features" + bool "enable debug features" depends on SDFAT_FS default y config SDFAT_DBG_IOCTL - bool "Enable debug-ioctl features" + bool "enable debug-ioctl features" depends on SDFAT_FS && SDFAT_DEBUG default n config SDFAT_DBG_MSG - bool "Enable debug messages" + bool "enable debug messages" depends on SDFAT_FS && SDFAT_DEBUG default y config SDFAT_DBG_BUGON - bool "Enable strict BUG_ON() for debugging" + bool "enable strict BUG_ON() for debugging" depends on SDFAT_FS && SDFAT_DEBUG default n config SDFAT_DBG_WARNON - bool "Enable strict WARN_ON() for debugging" + bool "enable strict WARN_ON() for debugging" depends on SDFAT_FS && SDFAT_DEBUG default n config SDFAT_STATISTICS - bool "Enable statistics for bigdata" + bool "enable statistics for bigdata" depends on SDFAT_FS default y diff --git a/fs/sdfat/misc.c b/fs/sdfat/misc.c index f12096c1f..b9592ef4c 100644 --- a/fs/sdfat/misc.c +++ b/fs/sdfat/misc.c @@ -253,9 +253,15 @@ void sdfat_time_unix2fat(struct sdfat_sb_info *sbi, struct timespec *ts, TIMESTAMP_T *tm_now(struct sdfat_sb_info *sbi, TIMESTAMP_T *tp) { - struct timespec ts = CURRENT_TIME_SEC; + struct timespec ts; DATE_TIME_T dt; +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0) + ts = CURRENT_TIME_SEC; +#else + ktime_get_real_ts(&ts); +#endif + sdfat_time_unix2fat(sbi, &ts, &dt); tp->year = dt.Year; @@ -378,4 +384,3 @@ void __sdfat_dmsg(int level, const char *fmt, ...) #endif } #endif - diff --git a/fs/sdfat/mpage.c b/fs/sdfat/mpage.c index 8a0ce7f89..b39858258 100644 --- a/fs/sdfat/mpage.c +++ b/fs/sdfat/mpage.c @@ -94,7 +94,11 @@ static inline void __sdfat_submit_bio_write2(int flags, struct bio *bio) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) static void mpage_write_end_io(struct bio *bio) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) + __mpage_write_end_io(bio, bio->bi_status); +#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) */ __mpage_write_end_io(bio, bio->bi_error); +#endif } #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) */ static void mpage_write_end_io(struct bio *bio, int err) @@ -277,7 +281,11 @@ mpage_alloc(struct block_device *bdev, } if (bio) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) + bio_set_dev(bio, bdev); +#else bio->bi_bdev = bdev; +#endif __sdfat_set_bio_sector(bio, first_sector); } return bio; @@ -361,7 +369,11 @@ static int sdfat_mpage_writepage(struct page *page, if (buffer_new(bh)) { clear_buffer_new(bh); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) + clean_bdev_bh_alias(bh); +#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) */ unmap_underlying_metadata(bh->b_bdev, bh->b_blocknr); +#endif } } @@ -411,8 +423,12 @@ static int sdfat_mpage_writepage(struct page *page, goto confused; if (buffer_new(&map_bh)) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) + clean_bdev_bh_alias(&map_bh); +#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) */ unmap_underlying_metadata(map_bh.b_bdev, map_bh.b_blocknr); +#endif if (buffer_boundary(&map_bh)) { boundary_block = map_bh.b_blocknr; boundary_bdev = map_bh.b_bdev; @@ -604,4 +620,3 @@ int sdfat_mpage_writepages(struct address_space *mapping, } #endif /* CONFIG_SDFAT_ALIGNED_MPAGE_WRITE */ - diff --git a/fs/sdfat/sdfat.c b/fs/sdfat/sdfat.c index 704f335b4..d83bf369b 100644 --- a/fs/sdfat/sdfat.c +++ b/fs/sdfat/sdfat.c @@ -68,6 +68,9 @@ /* skip iterating emit_dots when dir is empty */ #define ITER_POS_FILLED_DOTS (2) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0) +#define current_time(x) (CURRENT_TIME_SEC) +#endif /* type index declare at sdfat.h */ const char *FS_TYPE_STR[] = { "auto", @@ -219,7 +222,11 @@ static inline void inode_unlock(struct inode *inode) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) static void sdfat_writepage_end_io(struct bio *bio) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) + __sdfat_writepage_end_io(bio, bio->bi_status); +#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) */ __sdfat_writepage_end_io(bio, bio->bi_error); +#endif } #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) */ static void sdfat_writepage_end_io(struct bio *bio, int err) @@ -2306,7 +2313,6 @@ static int __sdfat_create(struct inode *dir, struct dentry *dentry) { struct super_block *sb = dir->i_sb; struct inode *inode; - struct timespec ts; FILE_ID_T fid; loff_t i_pos; int err; @@ -2315,8 +2321,6 @@ static int __sdfat_create(struct inode *dir, struct dentry *dentry) TMSG("%s entered\n", __func__); - ts = CURRENT_TIME_SEC; - err = fsapi_create(dir, (u8 *) dentry->d_name.name, FM_REGULAR, &fid); if (err) goto out; @@ -2324,7 +2328,7 @@ static int __sdfat_create(struct inode *dir, struct dentry *dentry) __lock_d_revalidate(dentry); dir->i_version++; - dir->i_ctime = dir->i_mtime = dir->i_atime = ts; + dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir); if (IS_DIRSYNC(dir)) (void) sdfat_sync_inode(dir); else @@ -2337,7 +2341,7 @@ static int __sdfat_create(struct inode *dir, struct dentry *dentry) goto out; } inode->i_version++; - inode->i_mtime = inode->i_atime = inode->i_ctime = ts; + inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); /* timestamp is already written, so mark_inode_dirty() is unneeded. */ d_instantiate(dentry, inode); @@ -2471,15 +2475,12 @@ static int sdfat_unlink(struct inode *dir, struct dentry *dentry) { struct inode *inode = dentry->d_inode; struct super_block *sb = dir->i_sb; - struct timespec ts; int err; __lock_super(sb); TMSG("%s entered\n", __func__); - ts = CURRENT_TIME_SEC; - SDFAT_I(inode)->fid.size = i_size_read(inode); __cancel_dfr_work(inode, 0, SDFAT_I(inode)->fid.size, __func__); @@ -2491,14 +2492,14 @@ static int sdfat_unlink(struct inode *dir, struct dentry *dentry) __lock_d_revalidate(dentry); dir->i_version++; - dir->i_mtime = dir->i_atime = ts; + dir->i_mtime = dir->i_atime = current_time(dir); if (IS_DIRSYNC(dir)) (void) sdfat_sync_inode(dir); else mark_inode_dirty(dir); clear_nlink(inode); - inode->i_mtime = inode->i_atime = ts; + inode->i_mtime = inode->i_atime = current_time(inode); sdfat_detach(inode); dentry->d_time = dir->i_version; out: @@ -2512,7 +2513,6 @@ static int sdfat_symlink(struct inode *dir, struct dentry *dentry, const char *t { struct super_block *sb = dir->i_sb; struct inode *inode; - struct timespec ts; FILE_ID_T fid; loff_t i_pos; int err; @@ -2527,8 +2527,6 @@ static int sdfat_symlink(struct inode *dir, struct dentry *dentry, const char *t TMSG("%s entered\n", __func__); - ts = CURRENT_TIME_SEC; - err = fsapi_create(dir, (u8 *) dentry->d_name.name, FM_SYMLINK, &fid); if (err) goto out; @@ -2543,7 +2541,7 @@ static int sdfat_symlink(struct inode *dir, struct dentry *dentry, const char *t __lock_d_revalidate(dentry); dir->i_version++; - dir->i_ctime = dir->i_mtime = dir->i_atime = ts; + dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir); if (IS_DIRSYNC(dir)) (void) sdfat_sync_inode(dir); else @@ -2556,7 +2554,7 @@ static int sdfat_symlink(struct inode *dir, struct dentry *dentry, const char *t goto out; } inode->i_version++; - inode->i_mtime = inode->i_atime = inode->i_ctime = ts; + inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); /* timestamp is already written, so mark_inode_dirty() is unneeded. */ SDFAT_I(inode)->target = kmalloc((len+1), GFP_KERNEL); @@ -2579,7 +2577,6 @@ static int __sdfat_mkdir(struct inode *dir, struct dentry *dentry) { struct super_block *sb = dir->i_sb; struct inode *inode; - struct timespec ts; FILE_ID_T fid; loff_t i_pos; int err; @@ -2588,8 +2585,6 @@ static int __sdfat_mkdir(struct inode *dir, struct dentry *dentry) TMSG("%s entered\n", __func__); - ts = CURRENT_TIME_SEC; - err = fsapi_mkdir(dir, (u8 *) dentry->d_name.name, &fid); if (err) goto out; @@ -2597,7 +2592,7 @@ static int __sdfat_mkdir(struct inode *dir, struct dentry *dentry) __lock_d_revalidate(dentry); dir->i_version++; - dir->i_ctime = dir->i_mtime = dir->i_atime = ts; + dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir); if (IS_DIRSYNC(dir)) (void) sdfat_sync_inode(dir); else @@ -2611,7 +2606,7 @@ static int __sdfat_mkdir(struct inode *dir, struct dentry *dentry) goto out; } inode->i_version++; - inode->i_mtime = inode->i_atime = inode->i_ctime = ts; + inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); /* timestamp is already written, so mark_inode_dirty() is unneeded. */ d_instantiate(dentry, inode); @@ -2630,15 +2625,12 @@ static int sdfat_rmdir(struct inode *dir, struct dentry *dentry) { struct inode *inode = dentry->d_inode; struct super_block *sb = dir->i_sb; - struct timespec ts; int err; __lock_super(sb); TMSG("%s entered\n", __func__); - ts = CURRENT_TIME_SEC; - SDFAT_I(inode)->fid.size = i_size_read(inode); err = fsapi_rmdir(dir, &(SDFAT_I(inode)->fid)); @@ -2648,7 +2640,7 @@ static int sdfat_rmdir(struct inode *dir, struct dentry *dentry) __lock_d_revalidate(dentry); dir->i_version++; - dir->i_mtime = dir->i_atime = ts; + dir->i_mtime = dir->i_atime = current_time(dir); if (IS_DIRSYNC(dir)) (void) sdfat_sync_inode(dir); else @@ -2656,7 +2648,7 @@ static int sdfat_rmdir(struct inode *dir, struct dentry *dentry) drop_nlink(dir); clear_nlink(inode); - inode->i_mtime = inode->i_atime = ts; + inode->i_mtime = inode->i_atime = current_time(inode); sdfat_detach(inode); dentry->d_time = dir->i_version; out: @@ -2671,7 +2663,6 @@ static int __sdfat_rename(struct inode *old_dir, struct dentry *old_dentry, { struct inode *old_inode, *new_inode; struct super_block *sb = old_dir->i_sb; - struct timespec ts; loff_t i_pos; int err; @@ -2682,8 +2673,6 @@ static int __sdfat_rename(struct inode *old_dir, struct dentry *old_dentry, old_inode = old_dentry->d_inode; new_inode = new_dentry->d_inode; - ts = CURRENT_TIME_SEC; - SDFAT_I(old_inode)->fid.size = i_size_read(old_inode); __cancel_dfr_work(old_inode, 0, 1, __func__); @@ -2696,7 +2685,7 @@ static int __sdfat_rename(struct inode *old_dir, struct dentry *old_dentry, __lock_d_revalidate(new_dentry); new_dir->i_version++; - new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime = ts; + new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime = current_time(new_dir); if (IS_DIRSYNC(new_dir)) (void) sdfat_sync_inode(new_dir); else @@ -2717,7 +2706,7 @@ static int __sdfat_rename(struct inode *old_dir, struct dentry *old_dentry, } old_dir->i_version++; - old_dir->i_ctime = old_dir->i_mtime = ts; + old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); if (IS_DIRSYNC(old_dir)) (void) sdfat_sync_inode(old_dir); else @@ -2736,7 +2725,7 @@ static int __sdfat_rename(struct inode *old_dir, struct dentry *old_dentry, __func__); WARN_ON(new_inode->i_nlink == 0); } - new_inode->i_ctime = ts; + new_inode->i_ctime = current_time(new_inode); #if 0 (void) sdfat_sync_inode(new_inode); #endif @@ -2760,7 +2749,7 @@ static int sdfat_cont_expand(struct inode *inode, loff_t size) if (err) return err; - inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; + inode->i_ctime = inode->i_mtime = current_time(inode); mark_inode_dirty(inode); if (!IS_SYNC(inode)) @@ -2893,9 +2882,15 @@ static int sdfat_setattr(struct dentry *dentry, struct iattr *attr) return error; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +static int sdfat_getattr(const struct path *path, struct kstat *stat, u32 request_mask, unsigned int flags) +{ + struct inode *inode = path->dentry->d_inode; +#else static int sdfat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct inode *inode = dentry->d_inode; +#endif TMSG("%s entered\n", __func__); @@ -2930,7 +2925,9 @@ static const struct inode_operations sdfat_dir_inode_operations = { /* File Operations */ /*======================================================================*/ static const struct inode_operations sdfat_symlink_inode_operations = { +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) .readlink = generic_readlink, +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) .get_link = sdfat_follow_link, #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) */ @@ -3013,7 +3010,7 @@ static void sdfat_truncate(struct inode *inode, loff_t old_size) if (err) goto out; - inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; + inode->i_ctime = inode->i_mtime = current_time(inode); if (IS_DIRSYNC(inode)) (void) sdfat_sync_inode(inode); else @@ -3447,7 +3444,11 @@ static inline void sdfat_submit_fullpage_bio(struct block_device *bdev, */ bio = bio_alloc(GFP_NOIO, 1); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) + bio_set_dev(bio, bdev); +#else bio->bi_bdev = bdev; +#endif bio->bi_vcnt = 1; bio->bi_io_vec[0].bv_page = page; /* Inline vec */ bio->bi_io_vec[0].bv_len = length; /* PAGE_SIZE */ @@ -3538,7 +3539,11 @@ static int sdfat_writepage(struct page *page, struct writeback_control *wbc) if (buffer_new(bh)) { clear_buffer_new(bh); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) + clean_bdev_bh_alias(bh); +#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) */ unmap_underlying_metadata(bh->b_bdev, bh->b_blocknr); +#endif } } @@ -3714,7 +3719,7 @@ static int sdfat_write_end(struct file *file, struct address_space *mapping, sdfat_write_failed(mapping, pos+len); if (!(err < 0) && !(fid->attr & ATTR_ARCHIVE)) { - inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; + inode->i_mtime = inode->i_ctime = current_time(inode); fid->attr |= ATTR_ARCHIVE; mark_inode_dirty(inode); } @@ -4720,12 +4725,9 @@ static int sdfat_read_root(struct inode *inode) { struct super_block *sb = inode->i_sb; struct sdfat_sb_info *sbi = SDFAT_SB(sb); - struct timespec ts; FS_INFO_T *fsi = &(sbi->fsi); DIR_ENTRY_T info; - ts = CURRENT_TIME_SEC; - SDFAT_I(inode)->fid.dir.dir = fsi->root_dir; SDFAT_I(inode)->fid.dir.flags = 0x01; SDFAT_I(inode)->fid.entry = -1; @@ -4761,7 +4763,7 @@ static int sdfat_read_root(struct inode *inode) SDFAT_I(inode)->i_size_ondisk = i_size_read(inode); sdfat_save_attr(inode, ATTR_SUBDIR); - inode->i_mtime = inode->i_atime = inode->i_ctime = ts; + inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); set_nlink(inode, info.NumSubdirs + 2); return 0; } @@ -4959,6 +4961,11 @@ static int __init sdfat_init_inodecache(void) static void sdfat_destroy_inodecache(void) { + /* + * Make sure all delayed rcu free inodes are flushed before we + * destroy cache. + */ + rcu_barrier(); kmem_cache_destroy(sdfat_inode_cachep); } @@ -4997,7 +5004,6 @@ static struct file_system_type sdfat_fs_type = { #endif /* CONFIG_SDFAT_DBG_IOCTL */ .fs_flags = FS_REQUIRES_DEV, }; -MODULE_ALIAS_FS("sdfat"); #ifdef CONFIG_SDFAT_USE_FOR_EXFAT static struct file_system_type exfat_fs_type = { @@ -5011,7 +5017,6 @@ static struct file_system_type exfat_fs_type = { #endif /* CONFIG_SDFAT_DBG_IOCTL */ .fs_flags = FS_REQUIRES_DEV, }; -MODULE_ALIAS_FS("exfat"); #endif /* CONFIG_SDFAT_USE_FOR_EXFAT */ #ifdef CONFIG_SDFAT_USE_FOR_VFAT @@ -5026,7 +5031,6 @@ static struct file_system_type vfat_fs_type = { #endif /* CONFIG_SDFAT_DBG_IOCTL */ .fs_flags = FS_REQUIRES_DEV, }; -MODULE_ALIAS_FS("vfat"); #endif /* CONFIG_SDFAT_USE_FOR_VFAT */ static int __init init_sdfat_fs(void) @@ -5127,4 +5131,3 @@ module_exit(exit_sdfat_fs); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("FAT/exFAT filesystem support"); MODULE_AUTHOR("Samsung Electronics Co., Ltd."); - diff --git a/fs/sdfat/statistics.c b/fs/sdfat/statistics.c index 00624df5a..2ae1a93fb 100644 --- a/fs/sdfat/statistics.c +++ b/fs/sdfat/statistics.c @@ -47,8 +47,10 @@ static struct kset *sdfat_statistics_kset; static ssize_t vfat_cl_show(struct kobject *kobj, struct kobj_attribute *attr, char *buff) { - return snprintf(buff, PAGE_SIZE, "VCL_512B_I:%u,VCL_1K_I:%u,VCL_2K_I:%u," - "VCL_4K_I:%u,VCL_8K_I:%u,VCL_16K_I:%u,VCL_32K_I:%u\n", + return snprintf(buff, PAGE_SIZE, "\"VCL_512B_I\":\"%u\"," + "\"VCL_1K_I\":\"%u\",\"VCL_2K_I\":\"%u\"," + "\"VCL_4K_I\":\"%u\",\"VCL_8K_I\":\"%u\"," + "\"VCL_16K_I\":\"%u\",\"VCL_32K_I\":\"%u\"\n", statistics.clus_vfat[0], statistics.clus_vfat[1], statistics.clus_vfat[2], statistics.clus_vfat[3], statistics.clus_vfat[4], statistics.clus_vfat[5], @@ -58,10 +60,15 @@ static ssize_t vfat_cl_show(struct kobject *kobj, static ssize_t exfat_cl_show(struct kobject *kobj, struct kobj_attribute *attr, char *buff) { - return snprintf(buff, PAGE_SIZE, "ECL_512B_I:%u,ECL_1K_I:%u,ECL_2K_I:%u," - "ECL_4K_I:%u,ECL_8K_I:%u,ECL_16K_I:%u,ECL_32K_I:%u,ECL_64K_I:%u," - "ECL_128K_I:%u,ECL_256K_I:%u,ECL_512K_I:%u,ECL_1M_I:%u," - "ECL_2M_I:%u,ECL_4M_I:%u,ECL_8M_I:%u,ECL_16M_I:%u,ECL_32M_I:%u\n", + return snprintf(buff, PAGE_SIZE, "\"ECL_512B_I\":\"%u\"," + "\"ECL_1K_I\":\"%u\",\"ECL_2K_I\":\"%u\"," + "\"ECL_4K_I\":\"%u\",\"ECL_8K_I\":\"%u\"," + "\"ECL_16K_I\":\"%u\",\"ECL_32K_I\":\"%u\"," + "\"ECL_64K_I\":\"%u\",\"ECL_128K_I\":\"%u\"," + "\"ECL_256K_I\":\"%u\",\"ECL_512K_I\":\"%u\"," + "\"ECL_1M_I\":\"%u\",\"ECL_2M_I\":\"%u\"," + "\"ECL_4M_I\":\"%u\",\"ECL_8M_I\":\"%u\"," + "\"ECL_16M_I\":\"%u\",\"ECL_32M_I\":\"%u\"\n", statistics.clus_exfat[0], statistics.clus_exfat[1], statistics.clus_exfat[2], statistics.clus_exfat[3], statistics.clus_exfat[4], statistics.clus_exfat[5], @@ -76,8 +83,9 @@ static ssize_t exfat_cl_show(struct kobject *kobj, static ssize_t mount_show(struct kobject *kobj, struct kobj_attribute *attr, char *buff) { - return snprintf(buff, PAGE_SIZE, "FAT12_MNT_I:%u,FAT16_MNT_I:%u,FAT32_MNT_I:%u," - "EXFAT_MNT_I:%u\n", + return snprintf(buff, PAGE_SIZE, "\"FAT12_MNT_I\":\"%u\"," + "\"FAT16_MNT_I\":\"%u\",\"FAT32_MNT_I\":\"%u\"," + "\"EXFAT_MNT_I\":\"%u\"\n", statistics.mnt_cnt[SDFAT_MNT_FAT12], statistics.mnt_cnt[SDFAT_MNT_FAT16], statistics.mnt_cnt[SDFAT_MNT_FAT32], @@ -87,8 +95,10 @@ static ssize_t mount_show(struct kobject *kobj, static ssize_t nofat_op_show(struct kobject *kobj, struct kobj_attribute *attr, char *buff) { - return snprintf(buff, PAGE_SIZE, "NOFAT_MOUNT_I:%u,NOFAT_MKDIR_I:%u,NOFAT_CREATE_I:%u," - "NOFAT_READ_I:%u,NOFAT_WRITE_I:%u,NOFAT_TRUNC_I:%u\n", + return snprintf(buff, PAGE_SIZE, "\"NOFAT_MOUNT_I\":\"%u\"," + "\"NOFAT_MKDIR_I\":\"%u\",\"NOFAT_CREATE_I\":\"%u\"," + "\"NOFAT_READ_I\":\"%u\",\"NOFAT_WRITE_I\":\"%u\"," + "\"NOFAT_TRUNC_I\":\"%u\"\n", statistics.nofat_op[SDFAT_OP_EXFAT_MNT], statistics.nofat_op[SDFAT_OP_MKDIR], statistics.nofat_op[SDFAT_OP_CREATE], @@ -100,9 +110,11 @@ static ssize_t nofat_op_show(struct kobject *kobj, static ssize_t vol_size_show(struct kobject *kobj, struct kobj_attribute *attr, char *buff) { - return snprintf(buff, PAGE_SIZE, "VOL_4G_I:%u,VOL_8G_I:%u,VOL_16G_I:%u," - "VOL_32G_I:%u,VOL_64G_I:%u,VOL_128G_I:%u,VOL_256G_I:%u," - "VOL_512G_I:%u,VOL_XTB_I:%u\n", + return snprintf(buff, PAGE_SIZE, "\"VOL_4G_I\":\"%u\"," + "\"VOL_8G_I\":\"%u\",\"VOL_16G_I\":\"%u\"," + "\"VOL_32G_I\":\"%u\",\"VOL_64G_I\":\"%u\"," + "\"VOL_128G_I\":\"%u\",\"VOL_256G_I\":\"%u\"," + "\"VOL_512G_I\":\"%u\",\"VOL_XTB_I\":\"%u\"\n", statistics.vol_size[SDFAT_VOL_4G], statistics.vol_size[SDFAT_VOL_8G], statistics.vol_size[SDFAT_VOL_16G], diff --git a/fs/sdfat/version.h b/fs/sdfat/version.h index c49175c02..999f052a7 100644 --- a/fs/sdfat/version.h +++ b/fs/sdfat/version.h @@ -22,4 +22,4 @@ /* PURPOSE : sdFAT File Manager */ /* */ /************************************************************************/ -#define SDFAT_VERSION "2.0.6-lineage" +#define SDFAT_VERSION "2.0.8-lineage" |
