* Rich Freeman <ri...@gentoo.org> [150224 10:19]:
> On Tue, Feb 24, 2015 at 8:11 AM, Todd Goodman <t...@bonedaddy.net> wrote:
> >
> > Can you explain why a log-based filesystem like f2fs would have any
> > impact on wear leveling?
> >
> > As I understand it, wear leveling (and bad block replacement) occurs on
> > the SSD itself (in the Flash Translation Layer probably.)
> >
> 
> Well, if the device has a really dumb firmware there is nothing you
> can do to prevent it from wearing itself out.  However, log-based
> filesystems and f2fs in particular are designed to make this very
> unlikely in practice.
> 
> Log-based filesystems never overwrite data in place.  Instead all
> changes are appended into empty space, until a large region of the
> disk is full.  Then the filesystem:
> 1.  Allocates a new unused contiguous region of the disk (which was
> already trimmed).  This would be aligned to the erase block size on
> the underlying SSD.
> 2.  Copies all data that is still in use from the oldest allocated
> region of the disk to the new region.
> 3.  Trims the entire old region, which was aligned to the erase block
> size when it was originally allocated.
> 
> So, the entire space of the disk is written to sequentially, and the
> head basically eats the tail.  Every block on the drive gets written
> to once before the first block on the drive gets written to twice.
[..SNIP..]

Thanks for the info.

But the device is still doing wear leveling and bad block
replacement so you're beholden to those algorithms and what you think
you're allocating as sequential blocks of the flash are not necessarily so.

Of course any decent wear leveling algorithm is still going to work
fine, but it seems to me like the wear leveling is still occuring in the
device and the filesystem is beneficial for use on flash based devices
for other reasons.

I'm sure I'm still missing something though.

Thanks,

Todd

Reply via email to