Re: [PATCH 1/6] fs: add hole punching to fallocate

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Dilger
Date: Wednesday, November 17, 2010 - 2:30 am

On 2010-11-16, at 20:34, Josef Bacik wrote:

Even if this is the case, and we decide today that PUNCH_HOLE without KEEP_SIZE is not desirable to implement, it would be better to just return -EOPNOTSUPP if both flags are not set than assume one or the other is what the user wanted.  That allows the ability to implement this in the future without breaking every application, while if it is assumed that KEEP_SIZE is always implicit there will never be a way to add that functionality without something awful like a separate CHANGE_SIZE flag for PUNCH_HOLE.

One option is to define FALLOC_FL_PUNCH_HOLE as 0x3 (so that KEEP_SIZE is always passed) and in the future we can define some new flag name like TRUNCATE_HOLE (or whatever) that is 0x2 only.

Cheers, Andreas





--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Hole Punching V2, Josef Bacik, (Mon Nov 15, 10:05 am)
[PATCH 1/6] fs: add hole punching to fallocate, Josef Bacik, (Mon Nov 15, 10:05 am)
[PATCH 4/6] Ext4: fail if we try to use hole punch, Josef Bacik, (Mon Nov 15, 10:05 am)
[PATCH 5/6] Btrfs: fail if we try to use hole punch, Josef Bacik, (Mon Nov 15, 10:05 am)
[PATCH 6/6] Gfs2: fail if we try to use hole punch, Josef Bacik, (Mon Nov 15, 10:05 am)
Re: [PATCH 4/6] Ext4: fail if we try to use hole punch, Josef Bacik, (Tue Nov 16, 5:50 am)
Re: [PATCH 1/6] fs: add hole punching to fallocate, Josef Bacik, (Tue Nov 16, 5:52 am)
Re: [PATCH 1/6] fs: add hole punching to fallocate, Josef Bacik, (Tue Nov 16, 5:53 am)
Re: [PATCH 4/6] Ext4: fail if we try to use hole punch, Josef Bacik, (Tue Nov 16, 9:05 am)
Re: [PATCH 4/6] Ext4: fail if we try to use hole punch, Pádraig Brady, (Tue Nov 16, 9:20 am)
Re: [PATCH 4/6] Ext4: fail if we try to use hole punch, Josef Bacik, (Tue Nov 16, 9:33 am)
Re: [PATCH 4/6] Ext4: fail if we try to use hole punch, Pádraig Brady, (Tue Nov 16, 9:56 am)
Re: [PATCH 4/6] Ext4: fail if we try to use hole punch, Greg Freemyer, (Tue Nov 16, 1:47 pm)
Re: [PATCH 1/6] fs: add hole punching to fallocate, Andreas Dilger, (Tue Nov 16, 5:22 pm)
Re: [PATCH 1/6] fs: add hole punching to fallocate, Dave Chinner, (Tue Nov 16, 7:11 pm)
Re: [PATCH 1/6] fs: add hole punching to fallocate, Josef Bacik, (Tue Nov 16, 7:28 pm)
Re: [PATCH 1/6] fs: add hole punching to fallocate, Josef Bacik, (Tue Nov 16, 7:34 pm)
Re: [PATCH 4/6] Ext4: fail if we try to use hole punch, Josef Bacik, (Tue Nov 16, 11:31 pm)
Re: [PATCH 1/6] fs: add hole punching to fallocate, Andreas Dilger, (Wed Nov 17, 2:19 am)
Re: [PATCH 1/6] fs: add hole punching to fallocate, Andreas Dilger, (Wed Nov 17, 2:30 am)