Il 02/03/2012 04:22, Martin K. Petersen ha scritto: > +int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector, > + sector_t nr_sects, gfp_t gfp_mask) > +{ > + if (bdev_write_same(bdev)) { > + unsigned char bdn[BDEVNAME_SIZE]; > + > + if (!blkdev_issue_write_same(bdev, sector, nr_sects, gfp_mask, > + ZERO_PAGE(0))) > + return 0; > + > + bdevname(bdev, bdn); > + printk(KERN_ERR "%s: WRITE SAME failed. Manually zeroing.\n", > + bdn); > + } > + > + return __blkdev_issue_zeroout(bdev, sector, nr_sects, gfp_mask); > +} Why not try DISCARD first if lbprz is true and the alignment is okay? This doesn't even require WRITE SAME support in the disk. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html