[Ocfs2-devel] [PATCH] ocfs2: Fix start offset to ocfs2_zero_range_for_truncate()

2016-08-11 Thread Ashish Samant
out. Fix this by skipping this cluster in such a scenario. Signed-off-by: Ashish Samant --- fs/ocfs2/file.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 4a6e130..ab305aa 100644 --- a/fs/ocfs2

[Ocfs2-devel] [PATCH v2] ocfs2: Fix start offset to ocfs2_zero_range_for_truncate()

2016-08-26 Thread Ashish Samant
the start offset. But in this case, we were wrongly passing this cluster to ocfs2_zero_range_for_truncate() to zero out. This will modify the cluster in place and zero it in the source too. Fix this by skipping this cluster in such a scenario. Reported-by: Saar Maoz Signed-off-by: Ashish Sam

Re: [Ocfs2-devel] [PATCH v2] ocfs2: Fix start offset to ocfs2_zero_range_for_truncate()

2016-08-29 Thread Ashish Samant
i, > > Thanks for this fix. I'd like to reproduce this issue locally and test > this patch, > could you elaborate the detailed steps of reproduction? > > Thanks, > Eric > > On 08/27/2016 07:04 AM, Ashish Samant wrote: >> If we punch a hole on a reflink such that

Re: [Ocfs2-devel] [PATCH v2] ocfs2: Fix start offset to ocfs2_zero_range_for_truncate()

2016-08-29 Thread Ashish Samant
1M count=1 | hexdump -C cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd || * 1+0 records in 1+0 records out 0010 Thanks, Ashish On 08/29/2016 08:33 PM, Eric Ren wrote: > Hello, > > On 08/30/2016 03:23 AM, Ashish Samant wrote: >> Hi Eric, >>

Re: [Ocfs2-devel] [PATCH v2] ocfs2: Fix start offset to ocfs2_zero_range_for_truncate()

2016-08-30 Thread Ashish Samant
Hi Eric, I am able to reproduce this on 4.8.0-rc3 as well. Can you try again and issue a sync between fallocate and dd? On 08/30/2016 12:38 AM, Eric Ren wrote: > Hi, > > I'm on 4.8.0-rc3 kernel. Hope someone else can double-confirm this;-) > > On 08/30/2016 12:11 PM, Ashish

Re: [Ocfs2-devel] [PATCH] ocfs2: Fix start offset to ocfs2_zero_range_for_truncate()

2016-09-14 Thread Ashish Samant
On 09/14/2016 03:43 PM, Andrew Morton wrote: > On Thu, 11 Aug 2016 16:12:27 -0700 Ashish Samant > wrote: > >> If we do fallocate with punch hole option on a reflink, with start offset >> on a cluster boundary and end offset somewhere in another cluster, we >>

[Ocfs2-devel] [PATCH] ocfs2: Fix double put of recount tree in ocfs2_lock_refcount_tree()

2016-09-15 Thread Ashish Samant
y avoiding the second call to ocfs2_refcount_tree_put() Signed-off-by: Ashish Samant --- fs/ocfs2/refcounttree.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 92bbe93..a9d4102 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refc

[Ocfs2-devel] [PATCH] ocfs2: fstrim: Fix start offset of first cluster group during fstrim

2017-10-12 Thread Ashish Samant
over into the next cluster group and zero out the group descriptor there. This can cause filesytem corruption that cannot be fixed by fsck. Signed-off-by: Ashish Samant Cc: sta...@vger.kernel.org --- fs/ocfs2/alloc.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions

Re: [Ocfs2-devel] fstrim corrupts ocfs2 filesystems(become ready-only) on SSD device which is managed by multipath

2017-10-27 Thread Ashish Samant
Hi Gang, The following patch sent to the list should fix the issue. https://patchwork.kernel.org/patch/10002583/ Thanks, Ashish On 10/27/2017 02:47 AM, Gang He wrote: > Hello Guys, > > I got a bug from the customer, he said, fstrim command corrupted ocfs2 file > system on their SSD SAN, the f

Re: [Ocfs2-devel] fstrim corrupts ocfs2 filesystems(become ready-only) on SSD device which is managed by multipath

2017-10-29 Thread Ashish Samant
not related to multipath configuration. > > > Thanks > Gang > > > >>>> Ashish Samant 10/28/17 2:06 AM >>> > Hi Gang, > > The following patch sent to the list should fix the issue. > > https://patchwork.kernel.org/patch/10002583/ > > Thanks,

Re: [Ocfs2-devel] fstrim corrupts ocfs2 filesystems(become ready-only) on SSD device which is managed by multipath

2017-10-31 Thread Ashish Samant
and >> running fstrim on it. >> loop converts fstrim to fallocate and puches a hole in the range, so it >> should zero out the range and >> cause corruption by zeroing the group descriptor. >> >> >>> There are any specific steps to reproduce this issue? >

[Ocfs2-devel] [PATCH] ocfs2: Take inode cluster lock before moving reflinked inode from orphan dir

2018-03-30 Thread Ashish Samant
2_init_security_and_acl() call chain. Signed-off-by: Ashish Samant --- fs/ocfs2/refcounttree.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index ab156e3..1b1283f 100644 --- a/fs/ocfs2/refcounttree.c +++ b/

Re: [Ocfs2-devel] [PATCH] ocfs2: Take inode cluster lock before moving reflinked inode from orphan dir

2018-04-10 Thread Ashish Samant
On 04/02/2018 02:17 AM, Joseph Qi wrote: > > On 18/3/31 01:42, Ashish Samant wrote: >> While reflinking an inode, we create a new inode in orphan directory, then >> take EX lock on it, reflink the original inode to orphan inode and release >> EX lock. Once the lock is rel

[Ocfs2-devel] [PATCH V2] ocfs2: Take inode cluster lock before moving reflinked inode from orphan dir

2018-04-11 Thread Ashish Samant
locking in the ocfs2_init_security_and_acl() call chain. Signed-off-by: Ashish Samant V1->V2: Modify commit message to better reflect the problem in upstream kernel. --- fs/ocfs2/refcounttree.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/fs/oc

Re: [Ocfs2-devel] [PATCH V2] ocfs2: Take inode cluster lock before moving reflinked inode from orphan dir

2018-05-01 Thread Ashish Samant
On 05/01/2018 05:08 PM, Andrew Morton wrote: > On Wed, 11 Apr 2018 12:31:47 -0700 Ashish Samant > wrote: > >> While reflinking an inode, we create a new inode in orphan directory, then >> take EX lock on it, reflink the original inode to orphan inode and release >>