Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from namjaejeon/exfat-next
Browse files Browse the repository at this point in the history
Exfat next
  • Loading branch information
namjaejeon authored Jun 10, 2020
2 parents cad3770 + d599ce4 commit 8fa6fe4
Show file tree
Hide file tree
Showing 12 changed files with 577 additions and 512 deletions.
106 changes: 87 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ script:
- mv linux ../
- mkdir ../linux-stable/fs/exfat
- cp -ar * ../linux-stable/fs/exfat/
- mkdir ../linux/fs/exfat
- cp -ar * ../linux/fs/exfat/

# Compile with 4.1 kernel
Expand All @@ -43,16 +42,16 @@ script:
- make -j$((`nproc`+1)) fs/exfat/exfat.ko

# Compile with latest Torvalds' kernel
# - cd ../linux
# - yes "" | make oldconfig > /dev/null
# - echo 'obj-$(CONFIG_EXFAT) += exfat/' >> fs/Makefile
#- echo 'source "fs/exfat/Kconfig"' >> fs/Kconfig
#- echo 'CONFIG_EXFAT_FS=m' >> .config
#- echo 'CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"' >> .config
#- make -j$((`nproc`+1)) fs/exfat/exfat.ko
# - cd ../linux
# - yes "" | make oldconfig > /dev/null
# - echo 'obj-$(CONFIG_EXFAT) += exfat/' >> fs/Makefile
# - echo 'source "fs/exfat/Kconfig"' >> fs/Kconfig
# - echo 'CONFIG_EXFAT_FS=m' >> .config
# - echo 'CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"' >> .config
# - make -j$((`nproc`+1)) fs/exfat/exfat.ko

# Run xfstests testsuite
- cd ../exfat
- cd ../linux-exfat-oot
- make > /dev/null
- sudo make install > /dev/null
- sudo modprobe exfat
Expand All @@ -61,15 +60,33 @@ script:
- ./configure > /dev/null
- make -j$((`nproc`+1)) > /dev/null
- sudo make install > /dev/null
- sudo cp lib/.libs/libexfat.so* /lib/
- sudo mkdir -p /mnt/scratch
- sudo mkdir -p /mnt/test
- time dd if=/dev/zero bs=1G count=10 of=test.img
- time dd if=/dev/zero bs=1G count=10 of=scratch.img
- sudo mkdir -p /mnt/full_test
# create file/director test
- truncate -s 10G full_test.img
- sudo losetup /dev/loop22 full_test.img
- sudo mkfs.exfat /dev/loop22
- sudo mount -t exfat /dev/loop22 /mnt/full_test/
- cd /mnt/full_test/
- i=1;while [ $i -le 10000 ];do sudo touch file$i;if [ $? != 0 ]; then exit 1; fi; i=$(($i + 1));done
- sync
- sudo fsck.exfat /dev/loop22
- sudo rm -rf *
- i=1;while [ $i -le 10000 ];do sudo mkdir file$i;if [ $? != 0 ]; then exit 1; fi; i=$(($i + 1));done
- sync
- sudo rm -rf *
- sudo fsck.exfat /dev/loop22
- cd -
- sudo umount /mnt/full_test/
- sudo fsck.exfat /dev/loop22
# run xfstests test
- truncate -s 100G test.img
- truncate -s 100G scratch.img
- sudo losetup /dev/loop20 test.img
- sudo losetup /dev/loop21 test.img
- sudo mkfs.exfat -c 4 /dev/loop20
- sudo mkfs.exfat -c 4 /dev/loop21
- sudo losetup /dev/loop21 scratch.img
- sudo mkfs.exfat /dev/loop20
- sudo mkfs.exfat /dev/loop21
- cd ..
- cd exfat-testsuites/
- tar xzvf xfstests-exfat.tgz > /dev/null
Expand All @@ -79,30 +96,37 @@ script:
- sudo ./check generic/006
- sudo ./check generic/007
- sudo ./check generic/011
- sudo ./check generic/013
- sudo ./check generic/014
- sudo ./check generic/028
- sudo ./check generic/029
- sudo ./check generic/030
- sudo ./check generic/034
- sudo ./check generic/035
- sudo ./check generic/036
- sudo ./check generic/069
- sudo ./check generic/071
- sudo ./check generic/073
- sudo ./check generic/074
- sudo ./check generic/075
- sudo ./check generic/076
- sudo ./check generic/080
- sudo ./check generic/084
- sudo ./check generic/086
- sudo ./check generic/091
- sudo ./check generic/095
- sudo ./check generic/098
- sudo ./check generic/100
- sudo ./check generic/112
- sudo ./check generic/113
- sudo ./check generic/114
- sudo ./check generic/120
- sudo ./check generic/123
- sudo ./check generic/124
- sudo ./check generic/127
- sudo ./check generic/129
- sudo ./check generic/130
- sudo ./check generic/131
- sudo ./check generic/132
- sudo ./check generic/133
- sudo ./check generic/135
- sudo ./check generic/141
- sudo ./check generic/169
Expand All @@ -111,8 +135,52 @@ script:
- sudo ./check generic/208
- sudo ./check generic/209
- sudo ./check generic/210
- sudo ./check generic/211
- sudo ./check generic/212
- sudo ./check generic/214
- sudo ./check generic/215
- sudo ./check generic/221
- sudo ./check generic/228
- sudo ./check generic/239
- sudo ./check generic/240
- sudo ./check generic/241
- sudo ./check generic/245
- sudo ./check generic/246
- sudo ./check generic/247
- sudo ./check generic/248
- sudo ./check generic/249
- sudo ./check generic/257
- sudo ./check generic/263
- sudo ./check generic/285
- sudo ./check generic/286
- sudo ./check generic/308
- sudo ./check generic/309
- sudo ./check generic/310
- sudo ./check generic/313
- sudo ./check generic/323
- sudo ./check generic/325
- sudo ./check generic/338
- sudo ./check generic/339
- sudo ./check generic/340
- sudo ./check generic/344
- sudo ./check generic/345
- sudo ./check generic/346
- sudo ./check generic/347
- sudo ./check generic/354
- sudo ./check generic/376
- sudo ./check generic/393
- sudo ./check generic/394
- sudo ./check generic/405
- sudo ./check generic/406
- sudo ./check generic/409
- sudo ./check generic/410
- sudo ./check generic/411
- sudo ./check generic/412
- sudo ./check generic/418
- sudo ./check generic/428
- sudo ./check generic/437
- sudo ./check generic/438
- sudo ./check generic/441
- sudo ./check generic/443
- sudo ./check generic/448
- sudo ./check generic/450
- sudo ./check generic/451
# - sudo ./check generic/452
11 changes: 3 additions & 8 deletions balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ static int exfat_allocate_bitmap(struct super_block *sb,
need_map_size = ((EXFAT_DATA_CLUSTER_COUNT(sbi) - 1) / BITS_PER_BYTE)
+ 1;
if (need_map_size != map_size) {
exfat_msg(sb, KERN_ERR,
"bogus allocation bitmap size(need : %u, cur : %lld)",
need_map_size, map_size);
exfat_err(sb, "bogus allocation bitmap size(need : %u, cur : %lld)",
need_map_size, map_size);
/*
* Only allowed when bogus allocation
* bitmap size is large
Expand Down Expand Up @@ -91,7 +90,6 @@ static int exfat_allocate_bitmap(struct super_block *sb,
}
}

sbi->pbr_bh = NULL;
return 0;
}

Expand Down Expand Up @@ -137,8 +135,6 @@ void exfat_free_bitmap(struct exfat_sb_info *sbi)
{
int i;

brelse(sbi->pbr_bh);

for (i = 0; i < sbi->map_sectors; i++)
__brelse(sbi->vol_amap[i]);

Expand Down Expand Up @@ -195,8 +191,7 @@ void exfat_clear_bitmap(struct inode *inode, unsigned int clu)
(1 << sbi->sect_per_clus_bits), GFP_NOFS, 0);

if (ret_discard == -EOPNOTSUPP) {
exfat_msg(sb, KERN_ERR,
"discard not supported by device, disabling");
exfat_err(sb, "discard not supported by device, disabling");
opts->discard = 0;
}
}
Expand Down
Loading

0 comments on commit 8fa6fe4

Please sign in to comment.