• circuitfarmer@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    But if the file system needs extra writes anyway for CoW, and the SSD needs its own CoW, then wouldn’t that end up being exponential writes? Or is there some mechanism which mitigates that?

    • InverseParallax@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 days ago

      The fs does cow then releases the old block if appropriate.

      The ssd has a tracking map for all blocks, it’s cow relies on a block being overwritten to free the old block.

      Basically it works out the same either way.

        • InverseParallax@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          4 days ago

          It’s interesting, however, if you mkfs.ext4 without -E ssd, or through some weirdness in your driver chain the filsystem doesn’t know it can discard, then everything everywhere sucks for everyone, a cow fs is worse because no blocks are ever overwritten till the end, and the block map becomes a disaster while performance goes down the drain.

          Nowadays this rarely happens outside of very broken USB mass storage chips.

          This is why we used to have the fstrim command.