Author Topic: Torn writes and journaled file systems  (Read 176 times)

Magnum

  • Member
  • *****
  • Posts: 2351
Torn writes and journaled file systems
« on: June 04, 2020, 07:04:12 AM »
Since we have a lot of gurus here, I seek your wisdom.

I was curious as to why Windows NTFS file system needs defragmentation as opposed to ext3 and ext4 systems.

So I did some research and I found this and would be interested in your feedback.

<The main disadvantages of a journaling system are that writes can get randomized and, more importantly, the act of updating the disk can corrupt <previously written metadata if power is lost at the time of the write, a problem commonly known as torn write.

https://docs.microsoft.com/en-us/archive/blogs/b8/building-the-next-generation-file-system-for-windows-refs

I found this on "torn writes", but to be honest I do not understand the explanation.

http://www.joshodgers.com/tag/torn-write/
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7448
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Torn writes and journaled file systems
« Reply #1 on: June 16, 2020, 03:24:10 PM »
I don't have the life and time to investigate all of the variants but the rough distinction with Microsoft drive mapping systems is between hash tables and tree structures. A file allocation table is basically a hash table, the earliest one was FAT, next gen was FAT32 then Microsoft changed to a tree system with NTFS. The tree system can be extended further because you just keep adding nodes where any hash table is finite.

Back when you could compare the two, FAT32 was faster than NTFS. I have not read the article but you can get fragmentation on a NTFS drive, I don't know what the Linux folks do but it is probably background defragmentation of some sort.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Magnum

  • Member
  • *****
  • Posts: 2351
Re: Torn writes and journaled file systems
« Reply #2 on: June 17, 2020, 05:39:32 AM »
thanks for the info.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org