On Fri, 12 Mar 2010 02:07:40 +0100 Hubert Kario <h...@qbs.com.pl> wrote:
> > [...] > > If the FS were to be smart and know about the 256kb requirement, it > > would do a read/modify/write cycle somewhere and then write the 4KB. > > If all the free blocks have been TRIMmed, FS should pick a completely free > erasure size block and write those 4KiB of data. > > Correct implementation of wear leveling in the drive should notice that the > write is entirely inside a free block and make just a write cycle adding > zeros > to the end of supplied data. Your assumption here is that your _addressed_ block layout is completely identical to the SSDs "disk" layout. Else you cannot know where a "free erasure block" is located and how to address it from FS. I really wonder what this assumption is based on. You still think a SSD is a true disk with linear addressing. I doubt that very much. Even on true spinning disks your assumption is wrong for relocated sectors. Which basically means that every disk controller firmware fiddles around with the physical layout since decades. Please accept that you cannot do a disks' job in FS. The more advanced technology gets the more disks become black boxes with a defined software interface. Use this interface and drop the idea of having inside knowledge of such a device. That's other peoples' work. If you want to design smart SSD controllers hire at a company that builds those. -- Regards, Stephan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html