Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-24 Thread Dave Chinner
On Mon, Jun 24, 2013 at 10:37:57AM +, Sidorov, Andrei wrote: > On 24.06.2013 13:36, Namjae Jeon wrote: > > Currently, we can try implementing dave's suggesstion of introducing a > > new flag FALLOC_FL_COLLAPSE_RANGE for falloctae instead of individual > > ioctls for both XFS and EXT4. Thanks. >

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-24 Thread Zheng Liu
On Mon, Jun 24, 2013 at 10:37:57AM +, Sidorov, Andrei wrote: > On 24.06.2013 13:36, Namjae Jeon wrote: > > Currently, we can try implementing dave's suggesstion of introducing a > > new flag FALLOC_FL_COLLAPSE_RANGE for falloctae instead of individual > > ioctls for both XFS and EXT4. Thanks. >

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-24 Thread Sidorov, Andrei
On 24.06.2013 13:36, Namjae Jeon wrote: > Currently, we can try implementing dave's suggesstion of introducing a > new flag FALLOC_FL_COLLAPSE_RANGE for falloctae instead of individual > ioctls for both XFS and EXT4. Thanks. Hi, Currently PUNCH_HOLE requires KEEP_SIZE to be set as well. I think t

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-24 Thread Namjae Jeon
2013/6/24, Christoph Hellwig : > On Mon, Jun 24, 2013 at 12:44:59PM +1000, Dave Chinner wrote: >> various DVR companies shipping equivalent ioctl-based functionality >> for XFS filesystems to both insert and remove chunks in video >> streams, but I've never been able to find the code for it anywher

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-24 Thread Dave Chinner
On Sun, Jun 23, 2013 at 11:12:35PM -0400, Theodore Ts'o wrote: > On Mon, Jun 24, 2013 at 12:44:59PM +1000, Dave Chinner wrote: > > > > Hence, at minimum, this should be a fallocate() operation, not a ext4 > > specific ioctl as it is relatively trivial to implement on most > > extent based filesyst

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-24 Thread Christoph Hellwig
On Mon, Jun 24, 2013 at 12:44:59PM +1000, Dave Chinner wrote: > various DVR companies shipping equivalent ioctl-based functionality > for XFS filesystems to both insert and remove chunks in video > streams, but I've never been able to find the code for it anywhere. Samsung does this, also for UDF.

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-23 Thread Namjae Jeon
2013/6/24, Andreas Dilger : > On 2013-06-23, at 0:07, Namjae Jeon wrote: > >> From: Namjae Jeon >> >> This patch series introduces 2 new ioctls for ext4. >> >> Truncate_block_range ioctl truncates blocks from source file. > Hi. Andreas. > How is this different from fallocate(FALLOC_FL_PUNCH_HOLE)

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-23 Thread Theodore Ts'o
On Mon, Jun 24, 2013 at 12:44:59PM +1000, Dave Chinner wrote: > > Hence, at minimum, this should be a fallocate() operation, not a ext4 > specific ioctl as it is relatively trivial to implement on most > extent based filesystems. The fallocate() uses a units of bytes for the offset and length; wo

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-23 Thread Dave Chinner
On Sun, Jun 23, 2013 at 08:32:32PM -0400, Eric Sandeen wrote: > On Jun 23, 2013, at 12:01 PM, Andreas Dilger wrote: > > > On 2013-06-23, at 0:07, Namjae Jeon wrote: > > > >> From: Namjae Jeon > >> > >> This patch series introduces 2 new ioctls for ext4. > >> > >> Truncate_block_range ioctl t

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-23 Thread Eric Sandeen
On Jun 23, 2013, at 12:01 PM, Andreas Dilger wrote: > On 2013-06-23, at 0:07, Namjae Jeon wrote: > >> From: Namjae Jeon >> >> This patch series introduces 2 new ioctls for ext4. >> >> Truncate_block_range ioctl truncates blocks from source file. > > How is this different from fallocate(FALL

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-23 Thread Andreas Dilger
On 2013-06-23, at 0:07, Namjae Jeon wrote: > From: Namjae Jeon > > This patch series introduces 2 new ioctls for ext4. > > Truncate_block_range ioctl truncates blocks from source file. How is this different from fallocate(FALLOC_FL_PUNCH_HOLE)? That is already in existing kernels, and porta

Re: [PATCH 0/3] ext4: introduce two new ioctls

2013-06-22 Thread Namjae Jeon
Hi. I attached testcases for these ioctls. Thanks. 2013/6/23 Namjae Jeon : > From: Namjae Jeon > > This patch series introduces 2 new ioctls for ext4. > > Truncate_block_range ioctl truncates blocks from source file. > Transfer_block_range ioctl transfers data blocks from source file > and appe

[PATCH 0/3] ext4: introduce two new ioctls

2013-06-22 Thread Namjae Jeon
From: Namjae Jeon This patch series introduces 2 new ioctls for ext4. Truncate_block_range ioctl truncates blocks from source file. Transfer_block_range ioctl transfers data blocks from source file and append them at the end of destination file. Ioctl1: EXT4_IOC_TRUNCATE_BLOCK_RANGE: Th

[PATCH 0/3] ext4: introduce two new ioctls

2013-06-22 Thread Namjae Jeon
From: Namjae Jeon This patch series introduces 2 new ioctls for ext4. Truncate_block_range ioctl truncates blocks from source file. Transfer_block_range ioctl transfers data blocks from source file and append them at the end of destination file. Ioctl1: EXT4_IOC_TRUNCATE_BLOCK_RANGE: Th