OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> writes: > diff -puN fs/fat/fatent.c~test fs/fat/fatent.c > --- linux-2.6/fs/fat/fatent.c~test 2008-08-07 01:24:23.000000000 +0900 > +++ linux-2.6-hirofumi/fs/fat/fatent.c 2008-08-07 01:33:07.000000000 +0900 > @@ -551,6 +551,11 @@ int fat_free_clusters(struct inode *inod > goto error; > } > > + /* Issue discard for the sectors we no longer care about */ > + blkdev_issue_discard(sb->s_bdev, > + fat_clus_to_blknr(sbi, fatent.entry), > + sbi->sec_per_clus, NULL); > + > ops->ent_put(&fatent, FAT_ENT_FREE); > if (sbi->free_clusters != -1) { > sbi->free_clusters++; Ah, blkdev_issue_discard() assumes blocksize is 512bytes, um... blkdev_issue_discard() takes bytes, and instead add some helpers for sb or inode? -- OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> -- 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