Slashdot Mirror


Samsung Creates New File System F2Fs For Linux & Android

sfcrazy writes "Samsung has created a new Linux file system called F2FS. Jaegeuk Kim of Samsung writes on the Linux Kernel Mailing List: F2FS is a new file system carefully designed for the NAND flash memory-based storage devices. We chose a log structure file system approach, but we tried to adapt it to the new form of storage. Also we remedy some known issues of the very old log structured file system, such as snowball effect of wandering tree and high cleaning overhead."

22 of 140 comments (clear)

  1. SSD Drives by Terry+Pearson · · Score: 4, Interesting

    While the primary benefit will initially be for Android devices, this will be great news for solid state drives as well. Great job Samsung!

    1. Re:SSD Drives by Anonymous Coward · · Score: 5, Informative

      No. SSDs present themselves to the OS as contiguous block devices. Filesystems intended for bare NAND flash like jffs(2), yaffs, and this new F2Fs would be totally useless for SSDs. They're intended for bare NAND, which SSDs are not.

    2. Re:SSD Drives by gumpish · · Score: 5, Funny

      Did you get the money to buy your SSD drive by going to the ATM machine and entering your PIN number?

    3. Re:SSD Drives by Terry+Pearson · · Score: 4, Interesting

      I am not 100% clear on NAND tech, but Samsung had an announcement about a NAND based SSD last week. I believe this is related to the F2FS announcement today. http://www.anandtech.com/show/6329/samsung-releases-tlc-nand-based-840-ssd

  2. Re:Keyword: Android by Anonymous Coward · · Score: 4, Insightful

    Well yeah, McDonalds isn't going to going to manufacture couches when it has no benefit to them.

  3. Remember when this was unthinkable? by Anonymous Coward · · Score: 4, Interesting

    Commercial hardware companies contributing to open-source and the kernel, I mean.

    It’s nice to see that Linux and the open-source philosophy more and more just is generally accepted.

    Let's hope it.s because they have seen the advantages of humans working together, helping each other out... and not just for nefarious dog-eat-dog (aka capitalist aka "free market" aka law of the jungle*) purposes.

    * Don’t worry. I know they're not supposed to be the same. The point I want to make, is that nowadays it gets all used to describe the same thing.

    1. Re:Remember when this was unthinkable? by Xtifr · · Score: 4, Informative

      No, I don't. I remember when it was rare, but not when it was unthinkable. Even if you mean copyleft as opposed to merely open-source (there was and is a lot more reluctance about copyleft), commercial hardware companies were contributing to the GNU project even before the Linux kernel sprang into existence. GCC has always had the backing of hardware companies. The GCC Ada backend was fully funded by commercial companies several years before Linus went public with his experimental kernel.

      Heck, some companies even recognized that the GPL protected their own code, even before Linux appeared. The GPL'd versions of Ghostscript existed because Aladdin recognized that the GPL prevented others from taking unfair advantage of their code, while still allowing the community to contribute.

  4. Re:Keyword: Android by Xtifr · · Score: 5, Insightful

    Sure, and they might not have released it to the public if it weren't for the GPL. On the other hand, they've developed something that looks like it may be very useful, and have released it without batting an eye. They're one of only seven Platinum members of the Linux Foundation. I think it's clear they understand how the ecosystem works, and they're happy to participate. Hard to fault them for that.

    And actually, as I understand it, they use Linux for a lot more than just Android devices. They also have embedded Linux in other systems, like TVs.

  5. Re:Keyword: Android by Anonymous Coward · · Score: 4, Interesting

    Some freezers too. They are actually involved with the development of the ELF end the enlightenment windows manager.

    I think Samsung likes Linux a lot

  6. Re:Better hurry to the Patent Office by Anonymous Coward · · Score: 5, Funny

    Glad to see proof that Samsung does innovate and not steal everything from AAPL like all Apple Fanboys think.

    What are you talking about? This is clearly a copy of Apple's original filesystem concept THAT THEY INVENTED when they created HFS! Why doesn't Samdung ACTUALLY innovate and find a new way to store data on a collection of sectors instead of just copying Apple all the time.

    The worst part is that Samdung didn't also copy the MARVELOUS AND CLEARLY CORRECT INVENTION of hiding the filesystem (which Apple invented) from the users. They're so far behind Apple that they can only BLATANTLY STEAL the easy parts!

  7. Re:Keyword: Android by MobileTatsu-NJG · · Score: 5, Funny

    And actually, as I understand it, they use Linux for a lot more than just Android devices. They also have embedded Linux in other systems, like TVs.

    Really? Well that explains why my Samsung TV has such a horrible interface*.

    * Kidding. :P

    --

    "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

  8. Innovation by PRMan · · Score: 4, Funny

    Hope Apple wasn't planning on using this in their iPads...

    --
    Peter predicted that you would "deliberately forget" creation 2000 years ago...
  9. It's not for bare NAND by bogolisk · · Score: 5, Informative

    No. SSDs present themselves to the OS as contiguous block devices. Filesystems intended for bare NAND flash like jffs(2), yaffs, and this new F2Fs would be totally useless for SSDs. They're intended for bare NAND, which SSDs are not.

    You're wrong

    f2fs work on top of block devices. f2fs sends TRIM (ATA command) down to the device. Bare NAND flash doesn't grok ATA commands.

    --
    Bogus
    1. Re:It's not for bare NAND by romiz · · Score: 5, Informative

      The problem is that even with a translation layer for block access, flash-based devices have limitations, which means that different usage patterns can dramatically change the performance of the device.

      For a (simplified) example, to write a file in ext3, you need to store the new data for the file, but you also need to store other metadata: the location of the data blocks themselves in the inode, the file size in the directory, the journaling data. This means that you have four 'internal block descriptors' open for writing at the same time.

      But block descriptors are a limited resource in SSDs, and even more so for low-cost eMMC devices. This means that with only two or three open files with regular writing, you could quite easily lead to some kind of thrashing state, with the device quickly opening and closing descriptors. Since flash memory writing is strongly constrained, this means that a whole block (2 MiB block size is common) containing a descriptor will need to be erased before its next use. As a result, each block only contains little interesting data, and writing only a small amount of data leads to a lot of flash write and erase access. This problem is called write amplification, and reduces both the disk's performance and its durability.

      The F2FS design is a log-based design, where all files on the disk share 6 common writing areas, for each kind of stored data, where the information is stored as it arrives. This will have a very positive effect against the write amplification problem, and is an example of how an adapted file system can have a positive impact, even on block-based devices.

  10. Re:Better hurry to the Patent Office by Anonymous Coward · · Score: 5, Funny

    Apple created the LFS, Litigation File System. The unique innovation looks ahead for a user copying a file from one directory to another, blocks the request, and transfers the operation to a county in Texas to be tied up in I/O for years.

  11. Re:Keyword: Android by GT66 · · Score: 5, Funny

    The irony being that a McDonalds couch would likely contain more actual meat than one of their hamburgers.

  12. Re:exactly by ZeroSumHappiness · · Score: 5, Interesting

    Because it's legally required to trickle down perhaps?

  13. Re:Keyword: Android by Xtifr · · Score: 5, Interesting

    I think Samsung likes Linux a lot

    Considering that a Platinum membership in the Linux Foundation requires plopping down at least half a million bucks, I suspect you're probably right. :)

    Heck, Google only has a Gold membership, and we know they like Linux. Samsung is in elite territory with corporations like IBM and Intel.

  14. Re:Keyword: Android by Xtifr · · Score: 4, Interesting

    I know you're kidding, but I should point out that Linux is not a requirement for building bad interfaces (though one might claim that it helps). TV engineers in general seem to have some impressive skills at building bad interfaces. My last three TVs all had terrible interfaces, and none of them were Linux-based. :)

  15. Re:I wonder how it is to be used by Jerome+H · · Score: 4, Informative

    You can find a lot of details in the txt file: https://lwn.net/Articles/518719/

    --
    int main() { while(1) fork(); }
  16. Re:Keyword: Android by maxdread · · Score: 4, Insightful

    Well considering the vast size of Samsung, they probably do far more work with Linux than Google does as well.

    People forget we're talking about a company that not only builds products in pretty much every home electronics category but also ships, CCTV, aircraft (for a while), artillery and automated turrets. None of this counting the bits and pieces they research and build that go into each of those products.

  17. RFS by thegarbz · · Score: 4, Informative

    While the primary benefit will initially be for Android devices, this will be great news for solid state drives as well. Great job Samsung!

    Before you go congratulating them on a great job, remember this is the second time they did this. The original attempt was called Robust File System. It was an abortion based on FAT16/32 with a duplicated file allocation table and some sort of journalling hacked on top.

    It was claimed to be optimised for NAND devices and all that other good stuff, but the community quickly came to rename it Really Fucking Slow.

    This file system was so slow that on the original Galaxy S the kernel would think software locked up while writing to the disk and prompt the user to force close the device. Search for "lagfix" if you're interested in what a disaster this was. There were users world wide trying to find fixes for the slow system performance, and the fix was often in the form of a kernel which supported ext4 or yaffs and a utility which converted the entire /system and /data partitions in the phone to the more common file systems.

    I don't have high hopes in Samsung's competence here.