On 2014-01-30 08:44, Vyacheslav Dubeyko wrote: > > On Jan 30, 2014, at 9:02 AM, Andreas Rohner wrote: > >> Hi Vyacheslav, >> >> On 2014-01-30 07:36, Vyacheslav Dubeyko wrote: >>> Hi Andreas, >>> >>> On Jan 30, 2014, at 5:47 AM, Andreas Rohner wrote: >>> >>>> This patch introduces a mount option bad_ftl that disables the >>>> periodic overwrites of the super block to make the file system better >>>> suitable for bad flash memory with a bad FTL. The super block is only >>>> written at umount time. So if there is a power outage the file system >>>> needs to be recovered by a linear scan of all segment summary blocks. >>>> >>>> The linear scan is only necessary if the file system wasn't umounted >>>> properly. So the normal mount time is not affected. >>>> >>>> Signed-off-by: Andreas Rohner <andreas.rohner@xxxxxxx> >>>> --- >>>> fs/nilfs2/segbuf.c | 3 ++- >>>> fs/nilfs2/segment.c | 3 ++- >>>> fs/nilfs2/super.c | 10 +++++++-- >>>> fs/nilfs2/the_nilfs.c | 54 ++++++++++++++++++++++++++++++++++++++++++++--- >>>> include/linux/nilfs2_fs.h | 4 +++- >>>> 5 files changed, 66 insertions(+), 8 deletions(-) >>>> >>> >>> As far as I can judge, conceptually it is simply rollback of the fix [1]. >> >> The normal recovery mode checks all partial segments and computes the >> checksum over all the data. That takes significantly longer than my >> approach of just checking one block per segment, namely the segment >> summary block. >> > > I don't think that your suggestion changes situation significantly. > Because in the issue [1] you can go through the whole volume in the really > bad environment. Maybe you will mount volume 30 minutes instead of 1 hour > with technique that you suggest in the patch. >>> [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a9bae189542e71f91e61a4428adf6e5a7dfe8063 I have just finished a test with my 100 GB HDD and SSD. I filled it with dd until it was 100% full. Then I cut power to the machine and timed the following mount operation: 100GB HDD: time sudo mount -o bad_ftl /dev/sda1 /mnt/ real 1m21.068s user 0m0.020s sys 0m0.770s 100GB SSD: time sudo mount -o bad_ftl /dev/sdc1 /mnt/ real 0m2.124s user 0m0.010s sys 0m0.243s So it looks quite bad for hard drives. To scan a 1 TB hard drive would take 13 minutes. But a 1 TB SSD would only take 20 seconds! I will test one of my SD cards next. Regards, Andreas Rohner -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html