On Mon, 2008-08-04 at 18:59 -0700, Andrew Morton wrote: > On Tue, 05 Aug 2008 02:45:16 +0100 David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote: > > > On Sat, 2008-07-26 at 13:02 -0700, Andrew Morton wrote: > > > I seem to be hearing a lot of silence over support for SSD devices. I > > > have this vague worry that there will be a large rollout of SSD > > > hardware and Linux will be found to have pants-around-ankles. > > > > > > For example, support for the T13 Trim command. There will be others, > > > but I surely don't know what they are. > > > > Here's a first attempt at that. It implements basic support for > > 'discard' requests in the block layer, implements that in FTL (the flash > > translation layer used on PCMCIA flash cards), and in FAT. > > Looks nice and simple. > The synchronous nature might get pretty painful, even after merging is > working? Yeah. That's just an example, based on blkdev_issue_flush(). When file systems submit bios directly, that can be different. > Perhaps we should have a new bio_doesnt_have_any_data_in_it() helper, > rather than opn-coding it here? Assuming that new non-data-containing > bios will turn up in the future. That would be something like (!bio->bi_io_vec) ? I'm kind of lost in block code; the whole of that part of the patch wants someone like Jens to go over it carefully. > > +static int ftl_discardsect(struct mtd_blktrans_dev *dev, > > + unsigned long sector, unsigned nr_sects) > > +{ > > + partition_t *part = (void *)dev; > > wuh? We're casting a `struct mtd_blktrans_ops *' into a partition_t? Yeah, I had to look carefully at that one when I pasted it from elsewhere. typedef struct partition_t { struct mtd_blktrans_dev mbd; .... -- dwmw2 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html