fs: sdfat: Update to version 2.0.8
Taken from SM-G965F_OO_Opensource kernel (G965FXXU2BRG6)
This commit is contained in:
parent
aa8183ffbd
commit
a661c8568b
|
|
@ -325,7 +325,6 @@ int amap_create(struct super_block *sb, u32 pack_ratio, u32 sect_per_au, u32 hid
|
||||||
int i, i_clu, i_au;
|
int i, i_clu, i_au;
|
||||||
int i_au_root = -1, i_au_hot_from = INT_MAX;
|
int i_au_root = -1, i_au_hot_from = INT_MAX;
|
||||||
u32 misaligned_sect = hidden_sect;
|
u32 misaligned_sect = hidden_sect;
|
||||||
u64 tmp;
|
|
||||||
|
|
||||||
BUG_ON(!fsi->bd_opened);
|
BUG_ON(!fsi->bd_opened);
|
||||||
|
|
||||||
|
|
@ -384,9 +383,7 @@ int amap_create(struct super_block *sb, u32 pack_ratio, u32 sect_per_au, u32 hid
|
||||||
|
|
||||||
amap->sb = sb;
|
amap->sb = sb;
|
||||||
|
|
||||||
tmp = fsi->num_sectors + misaligned_sect + sect_per_au - 1;
|
amap->n_au = (fsi->num_sectors + misaligned_sect + sect_per_au - 1) / sect_per_au;
|
||||||
do_div(tmp, sect_per_au);
|
|
||||||
amap->n_au = tmp;
|
|
||||||
amap->n_clean_au = 0;
|
amap->n_clean_au = 0;
|
||||||
amap->n_full_au = 0;
|
amap->n_full_au = 0;
|
||||||
|
|
||||||
|
|
|
||||||
38
statistics.c
38
statistics.c
|
|
@ -47,8 +47,10 @@ static struct kset *sdfat_statistics_kset;
|
||||||
static ssize_t vfat_cl_show(struct kobject *kobj,
|
static ssize_t vfat_cl_show(struct kobject *kobj,
|
||||||
struct kobj_attribute *attr, char *buff)
|
struct kobj_attribute *attr, char *buff)
|
||||||
{
|
{
|
||||||
return snprintf(buff, PAGE_SIZE, "VCL_512B_I:%u,VCL_1K_I:%u,VCL_2K_I:%u,"
|
return snprintf(buff, PAGE_SIZE, "\"VCL_512B_I\":\"%u\","
|
||||||
"VCL_4K_I:%u,VCL_8K_I:%u,VCL_16K_I:%u,VCL_32K_I:%u\n",
|
"\"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[0], statistics.clus_vfat[1],
|
||||||
statistics.clus_vfat[2], statistics.clus_vfat[3],
|
statistics.clus_vfat[2], statistics.clus_vfat[3],
|
||||||
statistics.clus_vfat[4], statistics.clus_vfat[5],
|
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,
|
static ssize_t exfat_cl_show(struct kobject *kobj,
|
||||||
struct kobj_attribute *attr, char *buff)
|
struct kobj_attribute *attr, char *buff)
|
||||||
{
|
{
|
||||||
return snprintf(buff, PAGE_SIZE, "ECL_512B_I:%u,ECL_1K_I:%u,ECL_2K_I:%u,"
|
return snprintf(buff, PAGE_SIZE, "\"ECL_512B_I\":\"%u\","
|
||||||
"ECL_4K_I:%u,ECL_8K_I:%u,ECL_16K_I:%u,ECL_32K_I:%u,ECL_64K_I:%u,"
|
"\"ECL_1K_I\":\"%u\",\"ECL_2K_I\":\"%u\","
|
||||||
"ECL_128K_I:%u,ECL_256K_I:%u,ECL_512K_I:%u,ECL_1M_I:%u,"
|
"\"ECL_4K_I\":\"%u\",\"ECL_8K_I\":\"%u\","
|
||||||
"ECL_2M_I:%u,ECL_4M_I:%u,ECL_8M_I:%u,ECL_16M_I:%u,ECL_32M_I:%u\n",
|
"\"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[0], statistics.clus_exfat[1],
|
||||||
statistics.clus_exfat[2], statistics.clus_exfat[3],
|
statistics.clus_exfat[2], statistics.clus_exfat[3],
|
||||||
statistics.clus_exfat[4], statistics.clus_exfat[5],
|
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,
|
static ssize_t mount_show(struct kobject *kobj,
|
||||||
struct kobj_attribute *attr, char *buff)
|
struct kobj_attribute *attr, char *buff)
|
||||||
{
|
{
|
||||||
return snprintf(buff, PAGE_SIZE, "FAT12_MNT_I:%u,FAT16_MNT_I:%u,FAT32_MNT_I:%u,"
|
return snprintf(buff, PAGE_SIZE, "\"FAT12_MNT_I\":\"%u\","
|
||||||
"EXFAT_MNT_I:%u\n",
|
"\"FAT16_MNT_I\":\"%u\",\"FAT32_MNT_I\":\"%u\","
|
||||||
|
"\"EXFAT_MNT_I\":\"%u\"\n",
|
||||||
statistics.mnt_cnt[SDFAT_MNT_FAT12],
|
statistics.mnt_cnt[SDFAT_MNT_FAT12],
|
||||||
statistics.mnt_cnt[SDFAT_MNT_FAT16],
|
statistics.mnt_cnt[SDFAT_MNT_FAT16],
|
||||||
statistics.mnt_cnt[SDFAT_MNT_FAT32],
|
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,
|
static ssize_t nofat_op_show(struct kobject *kobj,
|
||||||
struct kobj_attribute *attr, char *buff)
|
struct kobj_attribute *attr, char *buff)
|
||||||
{
|
{
|
||||||
return snprintf(buff, PAGE_SIZE, "NOFAT_MOUNT_I:%u,NOFAT_MKDIR_I:%u,NOFAT_CREATE_I:%u,"
|
return snprintf(buff, PAGE_SIZE, "\"NOFAT_MOUNT_I\":\"%u\","
|
||||||
"NOFAT_READ_I:%u,NOFAT_WRITE_I:%u,NOFAT_TRUNC_I:%u\n",
|
"\"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_EXFAT_MNT],
|
||||||
statistics.nofat_op[SDFAT_OP_MKDIR],
|
statistics.nofat_op[SDFAT_OP_MKDIR],
|
||||||
statistics.nofat_op[SDFAT_OP_CREATE],
|
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,
|
static ssize_t vol_size_show(struct kobject *kobj,
|
||||||
struct kobj_attribute *attr, char *buff)
|
struct kobj_attribute *attr, char *buff)
|
||||||
{
|
{
|
||||||
return snprintf(buff, PAGE_SIZE, "VOL_4G_I:%u,VOL_8G_I:%u,VOL_16G_I:%u,"
|
return snprintf(buff, PAGE_SIZE, "\"VOL_4G_I\":\"%u\","
|
||||||
"VOL_32G_I:%u,VOL_64G_I:%u,VOL_128G_I:%u,VOL_256G_I:%u,"
|
"\"VOL_8G_I\":\"%u\",\"VOL_16G_I\":\"%u\","
|
||||||
"VOL_512G_I:%u,VOL_XTB_I:%u\n",
|
"\"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_4G],
|
||||||
statistics.vol_size[SDFAT_VOL_8G],
|
statistics.vol_size[SDFAT_VOL_8G],
|
||||||
statistics.vol_size[SDFAT_VOL_16G],
|
statistics.vol_size[SDFAT_VOL_16G],
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,4 @@
|
||||||
/* PURPOSE : sdFAT File Manager */
|
/* PURPOSE : sdFAT File Manager */
|
||||||
/* */
|
/* */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
#define SDFAT_VERSION "2.0.6-lineage"
|
#define SDFAT_VERSION "2.0.8-lineage"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue