On Sat, Nov 02, 2013 at 07:45:30PM -0400, Theodore Ts'o wrote: > Add the ability for a user who has write access to a file to issue a > discard request for blocks belonging to a file. This can be done via > a new flag to the FIEMAP ioctl, or via the BLKDISCARD ioctl (which > previously only worked on block devices). As Dave already pointed out overloading a data manipulating operation over FIEMAP is a no-go. Besides that I really miss an explanation what the intended use cases are. What does this buy us over punching a hole on an actual real workload? Where is the overhead? Is it our shitty discard implementation? If so there's tons of low hanging fruit to fix there anyway that we shouldn't work around by interfaces taking shortcuts. Is it problems in ext4's extent management on hole punch? Is the bit of metadata created when doing an actual hole punch too much for that very specific workload? Also you really need to restrict this to devices that set the discard_zeroes_data flag, without that you'll expose random uninitialized data. -- 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