Re: [PATCH v2 1/2] ext4: Include forgotten start block on fallocate insert range

2017-01-09 Thread Roman Penyaev
On Sat, Jan 7, 2017 at 10:22 PM, Theodore Ts'o wrote: > On Fri, Jan 06, 2017 at 09:26:00PM +0100, Roman Pen wrote: >> While doing 'insert range' start block should be also shifted right. >> The bug can be easily reproduced by the following test: >> >> ptr = malloc(4096); >>

Re: [PATCH v2 1/2] ext4: Include forgotten start block on fallocate insert range

2017-01-09 Thread Roman Penyaev
On Sat, Jan 7, 2017 at 10:22 PM, Theodore Ts'o wrote: > On Fri, Jan 06, 2017 at 09:26:00PM +0100, Roman Pen wrote: >> While doing 'insert range' start block should be also shifted right. >> The bug can be easily reproduced by the following test: >> >> ptr = malloc(4096); >> assert(ptr);

Re: [PATCH v2 1/2] ext4: Include forgotten start block on fallocate insert range

2017-01-07 Thread Theodore Ts'o
On Fri, Jan 06, 2017 at 09:26:00PM +0100, Roman Pen wrote: > While doing 'insert range' start block should be also shifted right. > The bug can be easily reproduced by the following test: > > ptr = malloc(4096); > assert(ptr); > > fd = open("./ext4.file", O_CREAT | O_TRUNC | O_RDWR,

Re: [PATCH v2 1/2] ext4: Include forgotten start block on fallocate insert range

2017-01-07 Thread Theodore Ts'o
On Fri, Jan 06, 2017 at 09:26:00PM +0100, Roman Pen wrote: > While doing 'insert range' start block should be also shifted right. > The bug can be easily reproduced by the following test: > > ptr = malloc(4096); > assert(ptr); > > fd = open("./ext4.file", O_CREAT | O_TRUNC | O_RDWR,

[PATCH v2 1/2] ext4: Include forgotten start block on fallocate insert range

2017-01-06 Thread Roman Pen
While doing 'insert range' start block should be also shifted right. The bug can be easily reproduced by the following test: ptr = malloc(4096); assert(ptr); fd = open("./ext4.file", O_CREAT | O_TRUNC | O_RDWR, 0600); assert(fd >= 0); rc = fallocate(fd, 0, 0, 8192);

[PATCH v2 1/2] ext4: Include forgotten start block on fallocate insert range

2017-01-06 Thread Roman Pen
While doing 'insert range' start block should be also shifted right. The bug can be easily reproduced by the following test: ptr = malloc(4096); assert(ptr); fd = open("./ext4.file", O_CREAT | O_TRUNC | O_RDWR, 0600); assert(fd >= 0); rc = fallocate(fd, 0, 0, 8192);