Re: [Ocfs2-devel] [PATCH] ocfs2: ocfs2_inode_lock_tracker does not distinguish lock level

2018-05-11 Thread Andrew Morton
On Fri, 11 May 2018 12:16:51 +0800 Larry Chen wrote: > > Nice changelog, but it gives no information about the severity of the > > bug: how often does it hit and what is the end-user impact. > > > > This info is needed so that I and others can decide which kernel > > version(s)

Re: [Ocfs2-devel] [PATCH] ocfs2: ocfs2_inode_lock_tracker does not distinguish lock level

2018-05-10 Thread Andrew Morton
On Thu, 10 May 2018 13:32:30 +0800 Larry Chen wrote: > ocfs2_inode_lock_tracker as a variant of ocfs2_inode_lock, > is used to prevent deadlock due to recursive lock acquisition. > > But this function does not distinguish > whether the requested level is EX or PR. > > If a RP

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

2018-05-01 Thread Andrew Morton
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 > EX lock. Once the lock is released another node could

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-29 Thread Andrew Morton
On Thu, 29 Mar 2018 10:06:02 +0800 Changwei Ge wrote: > ocfs2_read_blocks() is used to read several blocks from disk. > Currently, the input argument *bhs* can be NULL or NOT. It depends on > the caller's behavior. If the function fails in reading blocks from > disk, the

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: don't handle migrate lockres if already in shutdown

2018-03-01 Thread Andrew Morton
On Thu, 1 Mar 2018 20:37:50 +0800 piaojun wrote: > Hi Changwei, > > Thanks for your quick reply, please see my comments below. > > On 2018/3/1 17:39, Changwei Ge wrote: > > Hi Jun, > > > > On 2018/3/1 17:27, piaojun wrote: > >> We should not handle migrate lockres if we

Re: [Ocfs2-devel] [PATCH v2] ocfs2: try a blocking lock before return AOP_TRUNCATED_PAGE

2018-01-05 Thread Andrew Morton
en <z...@suse.com> Acked-by: alex chen <alex.c...@huawei.com> Acked-by: piaojun <piao...@huawei.com> Cc: Mark Fasheh <mfas...@versity.com> Cc: Joel Becker <jl...@evilplan.org> Cc: Junxiao Bi <junxiao...@oracle.com> Cc: Joseph Qi <jiangqi...@gmail.com> Cc: Changwei

Re: [Ocfs2-devel] [PATCH] ocfs2: fall back to buffer IO when append dio is disabled with file hole existing

2017-12-18 Thread Andrew Morton
On Tue, 19 Dec 2017 09:24:17 +0800 Joseph Qi wrote: > > --- > > a/fs/ocfs2/aops.c~ocfs2-fall-back-to-buffer-io-when-append-dio-is-disabled-with-file-hole-existing-fix > > +++ a/fs/ocfs2/aops.c > > @@ -2469,10 +2469,9 @@ static int ocfs2_dio_end_io(struct kiocb > > * Will

Re: [Ocfs2-devel] [PATCH] ocfs2: fall back to buffer IO when append dio is disabled with file hole existing

2017-12-18 Thread Andrew Morton
On Mon, 18 Dec 2017 12:06:21 + Changwei Ge wrote: > Before ocfs2 supporting allocating clusters while doing append-dio, all append > dio will fall back to buffer io to allocate clusters firstly. Also, when it > steps on a file hole, it will fall back to buffer io, too.

Re: [Ocfs2-devel] [PATCH v2] ocfs2: using the OCFS2_XATTR_ROOT_SIZE macro in ocfs2_reflink_xattr_header()

2017-12-12 Thread Andrew Morton
On Mon, 11 Dec 2017 14:24:08 +0800 alex chen wrote: > Using the OCFS2_XATTR_ROOT_SIZE macro improves the readability of the code. > > Signed-off-by: Alex Chen > Reviewed-by: Jun Piao > --- > fs/ocfs2/xattr.c | 2 +- > 1 file

Re: [Ocfs2-devel] [PATCH] ocfs2: add trimfs dlm lock

2017-12-07 Thread Andrew Morton
On Thu, 7 Dec 2017 21:21:58 +0800 Gang He wrote: > As you know, ocfs2 has support trim the underlying disk via > fstrim command. But there is a problem, ocfs2 is a shared storage > cluster file system, if the user configures a scheduled fstrim > job on each file system node, this

[Ocfs2-devel] ocfs patches for review

2017-11-30 Thread Andrew Morton
I'm sitting on a bunch of ocfs2 patches which need additional review, please. I'll send them out now. I have a couple of notes-to-self: Subject: ocfs2: remove ocfs2_is_o2cb_active() Subject: ocfs2: give an obvious tip for mismatched cluster names Joseph had issues with this one Subject:

Re: [Ocfs2-devel] [PATCH] ocfs2: The goto is not useful in the function ocfs2_reserve_cluster_bitmap_bits, so remove it.

2017-11-15 Thread Andrew Morton
k6L2iDY8-HD0qT6Fo7Y=lcqqp5PvLSjaJ5MT6uqUC9J6gAhx8KP5Fd62d4ii4BA=KqlZy8JoC39DDT5b_TM6C12Vtg7AZhEE0QsYSC9ZJ30= Signed-off-by: guozhonghua <guozhong...@h3c.com> Cc: Mark Fasheh <mfas...@versity.com> Cc: Joel Becker <jl...@evilplan.org> Cc: Junxiao Bi <junxiao...@oracle.com> Cc: Joseph Qi <jia

Re: [Ocfs2-devel] [PATCH v2] ocfs2: should wait dio before inode lock in ocfs2_setattr()

2017-11-01 Thread Andrew Morton
On Tue, 31 Oct 2017 14:20:38 +0800 alex chen wrote: > we should wait dio requests to finish before inode lock in > ocfs2_setattr(), otherwise the following deadlock will be happened: > process 1 process 2process 3 > truncate file 'A'

Re: [Ocfs2-devel] [patch] ocfs2: fix qs_holds may could not be zero

2017-10-17 Thread Andrew Morton
On Thu, 21 Sep 2017 02:09:33 + Zhangyang wrote: > In our test, We fond that , when the network down, qs->qs_holds could not be > reduce to zero, it will lead to the node can't do fence. > > > > o2net_idle_timer -> o2quo_conn_err -> qs->qs_holds++, after >

Re: [Ocfs2-devel] mmotm 2016-08-02-15-53 uploaded

2017-10-10 Thread Andrew Morton
On Tue, 10 Oct 2017 14:06:41 -0400 Vitaly Mayatskih wrote: > * ocfs2-dlm-continue-to-purge-recovery-lockres-when-recovery > -master-goes-down.patch > > This one completely broke two node cluster use case: when one node dies, > the other one either eventually crashes

Re: [Ocfs2-devel] [PATCH v2] ocfs2: fix deadlock caused by recursive locking in xattr

2017-06-22 Thread Andrew Morton
On Thu, 22 Jun 2017 14:10:38 +0800 Joseph Qi wrote: > Looks good. > Reviewed-by: Joseph Qi Should this fix be backported into -stable kernels? > On 17/6/22 09:47, Eric Ren wrote: > > Another deadlock path caused by recursive locking is reported. > >

Re: [Ocfs2-devel] [PATCH v2] ocfs2: fix a static checker warning

2017-05-23 Thread Andrew Morton
On Tue, 23 May 2017 13:17:14 +0800 Gang He wrote: > This patch will fix a static code checker warning, which looks > like below, > fs/ocfs2/inode.c:179 ocfs2_iget() > warn: passing zero to 'ERR_PTR' > > this warning was caused by the > commit d56a8f32e4c6 ("ocfs2: check/fix

Re: [Ocfs2-devel] [PATCH] ocfs2: fix a static checker warning

2017-05-22 Thread Andrew Morton
On Mon, 22 May 2017 12:54:37 +0800 Gang He wrote: > This patch will fix a static checker warning, this warning was > caused by commit d56a8f32e4c662509ce50a37e78fa66c777977d3. after > apply this patch, the error return value will not be NULL(zero). When identifying another

Re: [Ocfs2-devel] [PATCH] ocfs2: o2hb: revert hb threshold to keep compatible

2017-03-28 Thread Andrew Morton
On Wed, 29 Mar 2017 09:07:08 +0800 Junxiao Bi <junxiao...@oracle.com> wrote: > On 03/29/2017 06:31 AM, Andrew Morton wrote: > > On Tue, 28 Mar 2017 09:40:45 +0800 Junxiao Bi <junxiao...@oracle.com> wrote: > > > >> Configfs is the interface for ocfs2-tools to

Re: [Ocfs2-devel] [PATCH] ocfs2: o2hb: revert hb threshold to keep compatible

2017-03-28 Thread Andrew Morton
On Tue, 28 Mar 2017 09:40:45 +0800 Junxiao Bi wrote: > Configfs is the interface for ocfs2-tools to set configure to > kernel. Change heartbeat dead threshold name in configfs will > cause compatible issue, so revert it. > > Fixes: 45b997737a80 ("ocfs2/cluster: use

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

2016-09-14 Thread Andrew Morton
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 > dont COW the first cluster starting at the start offset. But in

Re: [Ocfs2-devel] [PATCH] ocfs2: free the mle while the res had one, to avoid mle memory leak.

2016-09-13 Thread Andrew Morton
On Tue, 13 Sep 2016 07:52:30 + Guozhonghua wrote: > In the function dlm_migrate_request_handler, while the ret is --EEXIST, the > mle should be freed, otherwise the memory will be leaked. > > Signed-off-by: Guozhonghua > > ---

[Ocfs2-devel] ocfs patches to review

2016-07-28 Thread Andrew Morton
It's that time again. Just five patches this time, please. ocfs2-insure-dlm-lockspace-is-created-by-kernel-module.patch ocfs2-retry-on-enospc-if-sufficient-space-in-truncate-log.patch ocfs2-dlm-disable-bug_on-when-dlm_lock_res_dropping_ref-is-cleared-before-dlm_deref_lockres_done_handler.patch

Re: [Ocfs2-devel] ocfs2/dlm: continue to purge recovery lockres when recovery master goes down

2016-07-11 Thread Andrew Morton
On Mon, 11 Jul 2016 13:34:30 -0700 Andrew Morton <a...@linux-foundation.org> wrote: > On Sun, 10 Jul 2016 18:04:33 +0800 piaojun <piao...@huawei.com> wrote: > > > We found a dlm-blocked situation caused by continuous breakdown of > > recovery masters described be

Re: [Ocfs2-devel] [PATCH v2] ocfs2: improve recovery performance

2016-06-23 Thread Andrew Morton
On Thu, 23 Jun 2016 09:17:53 +0800 Junxiao Bi wrote: > Hi Andrew, > > Did you miss this patch to your tree? I would have seen it eventually. Explicitly cc'ing me on patches helps, please. ___ Ocfs2-devel mailing list

Re: [Ocfs2-devel] [PATCH] ocfs2: bump up o2cb network protocol version

2016-05-26 Thread Andrew Morton
On Thu, 26 May 2016 16:10:00 -0700 Mark Fasheh wrote: > On Thu, May 26, 2016 at 11:00:15AM +0800, Junxiao Bi wrote: > > Two new messages are added to support negotiating hb timeout. Stopping > > nodes talking old version to mount as they will cause the negotiation > > fail. > >

Re: [Ocfs2-devel] ocfs2: o2hb: not fence self if storage down

2016-05-23 Thread Andrew Morton
On Wed, 2 Mar 2016 15:56:06 +0800 Junxiao Bi wrote: > > Hi Mark, > > This serial of patches is to fix the issue that when storage down, > all nodes will fence self due to write timeout. > With this patch set, all nodes will keep going until storage back > online, except

Re: [Ocfs2-devel] ocfs2: fix recursive locking deadlock

2016-05-10 Thread Andrew Morton
On Tue, 10 May 2016 14:10:43 +0800 Junxiao Bi <junxiao...@oracle.com> wrote: > On 05/10/2016 01:58 PM, Andrew Morton wrote: > > On Tue, 10 May 2016 12:53:41 +0800 Junxiao Bi <junxiao...@oracle.com> wrote: > > > >> These two patches is to fix recursive lockin

Re: [Ocfs2-devel] ocfs2: fix recursive locking deadlock

2016-05-10 Thread Andrew Morton
On Tue, 10 May 2016 12:53:41 +0800 Junxiao Bi wrote: > These two patches is to fix recursive locking deadlock issues. As we > talked with Mark before, recursive locking is not allowed in ocfs2, > so these two patches fixes the deadlock issue with reverting back > patches

Re: [Ocfs2-devel] [PATCH] ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec

2016-03-25 Thread Andrew Morton
On Thu, 17 Mar 2016 17:11:27 +0800 piaojun wrote: > Clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec. > > Signed-off-by: Jun Piao > --- > alloc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/alloc.c

[Ocfs2-devel] ocfs2 patch queue

2016-03-23 Thread Andrew Morton
As usual I'm a bit late sending this out, sorry. Here's what I have: ocfs2-add-ocfs2_write_type_t-type-to-identify-the-caller-of-write.patch ocfs2-use-c_new-to-indicate-newly-allocated-extents.patch ocfs2-test-target-page-before-change-it.patch

Re: [Ocfs2-devel] [PATCH v4 2/5] ocfs2: sysfile interfaces for online file check

2016-03-21 Thread Andrew Morton
On Mon, 21 Mar 2016 16:38:02 -0700 Mark Fasheh <mfas...@suse.de> wrote: > On Mon, Mar 21, 2016 at 04:05:47PM -0700, Andrew Morton wrote: > > On Mon, 21 Mar 2016 15:57:23 -0700 Mark Fasheh <mfas...@suse.de> wrote: > > > > > On Mon, Feb 29, 201

Re: [Ocfs2-devel] [PATCH v4 2/5] ocfs2: sysfile interfaces for online file check

2016-03-21 Thread Andrew Morton
On Mon, 21 Mar 2016 15:57:23 -0700 Mark Fasheh wrote: > On Mon, Feb 29, 2016 at 01:17:59PM +0800, Gang He wrote: > > Implement online file check sysfile interfaces, e.g. > > how to create the related sysfile according to device name, > > how to display/handle file check request

Re: [Ocfs2-devel] [PATCH 1/6] ocfs2: o2hb: add negotiate timer

2016-01-21 Thread Andrew Morton
On Wed, 20 Jan 2016 11:13:34 +0800 Junxiao Bi wrote: > When storage down, all nodes will fence self due to write timeout. > The negotiate timer is designed to avoid this, with it node will > wait until storage up again. > > Negotiate timer working in the following way: >

Re: [Ocfs2-devel] [PATCH] ocfs2: dlmglue: fix false deadlock caused by clearing UPCONVERT_FINISHING too early

2016-01-21 Thread Andrew Morton
On Thu, 21 Jan 2016 16:18:38 +0800 Junxiao Bi wrote: > On 01/21/2016 04:10 PM, Eric Ren wrote: > > Hi Junxiao, > > > > On Thu, Jan 21, 2016 at 03:10:20PM +0800, Junxiao Bi wrote: > >> Hi Eric, > >> > >> This patch should fix your issue. > >> "NFS hangs in

Re: [Ocfs2-devel] [PATCH 2/6] ocfs2: o2hb: add NEGO_TIMEOUT message

2016-01-21 Thread Andrew Morton
On Wed, 20 Jan 2016 11:13:35 +0800 Junxiao Bi wrote: > This message is sent to master node when non-master nodes's > negotiate timer expired. Master node records these nodes in > a bitmap which is used to do write timeout timer re-queue > decision. > > ... > > +static int

Re: [Ocfs2-devel] [PATCH 2/6] ocfs2: o2hb: add NEGO_TIMEOUT message

2016-01-21 Thread Andrew Morton
On Fri, 22 Jan 2016 13:12:26 +0800 Junxiao Bi <junxiao...@oracle.com> wrote: > On 01/22/2016 07:47 AM, Andrew Morton wrote: > > On Wed, 20 Jan 2016 11:13:35 +0800 Junxiao Bi <junxiao...@oracle.com> wrote: > > > >> This message is sent to master node when non

Re: [Ocfs2-devel] [PATCH v3 1/4] ocfs2: export ocfs2_kset for online file check

2016-01-13 Thread Andrew Morton
On Wed, 13 Jan 2016 15:02:28 -0800 Mark Fasheh wrote: > On Fri, Dec 25, 2015 at 03:16:16PM +0800, Gang He wrote: > > Export ocfs2_kset object from ocfs2_stackglue kernel module, > > then online file check code will create the related sysfiles > > under ocfs2_kset object. > > >

Re: [Ocfs2-devel] [PATCH v3 0/4] Add online file check feature

2015-12-29 Thread Andrew Morton
On Fri, 25 Dec 2015 15:16:15 +0800 Gang He wrote: > When there are errors in the ocfs2 filesystem, > they are usually accompanied by the inode number which caused the error. > This inode number would be the input to fixing the file. > One of these options could be considered: > A

Re: [Ocfs2-devel] [PATCH v3 1/4] ocfs2: export ocfs2_kset for online file check

2015-12-29 Thread Andrew Morton
On Fri, 25 Dec 2015 15:16:16 +0800 Gang He wrote: > Export ocfs2_kset object from ocfs2_stackglue kernel module, > then online file check code will create the related sysfiles > under ocfs2_kset object. > > ... > > --- a/fs/ocfs2/stackglue.c > +++ b/fs/ocfs2/stackglue.c > @@

Re: [Ocfs2-devel] [PATCH v3 0/4] Add online file check feature

2015-12-29 Thread Andrew Morton
On Tue, 29 Dec 2015 20:00:08 -0700 "Gang He" wrote: > > This feature should be documented, please. That means all pseudo-file > > locations, all inputs, all outputs, expected behaviour etc etc. Enough > > info so that our users can usefully and fully use this feature in the > >

Re: [Ocfs2-devel] [PATCH] NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock

2015-12-22 Thread Andrew Morton
On Tue, 22 Dec 2015 12:14:22 -0800 Tariq Saeed wrote: > Hi, > Looks like this fell into through the cracks. This is a very real bug > encountered by Luminex Software and they tested the fix. > Regards > -Tariq > > > Forwarded Message > Subject:

Re: [Ocfs2-devel] [PATCH] ocfs2: call ocfs2_abort when journal abort

2015-12-18 Thread Andrew Morton
On Fri, 18 Dec 2015 15:19:25 +0800 Ryan Ding wrote: > orabug: 22293201 > > journal can not recover from abort state, so we should take following action > to > prevent file system from corruption: > > 1. change to readonly filesystem when local mount. We can not afford

Re: [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue

2015-12-10 Thread Andrew Morton
On Wed, 9 Dec 2015 10:28:17 +0800 Junxiao Bi <junxiao...@oracle.com> wrote: > Hi Andrew, > > On 12/09/2015 05:22 AM, Andrew Morton wrote: > > On Mon, 7 Dec 2015 12:09:06 +0800 Junxiao Bi <junxiao...@oracle.com> wrote: > > > >> commit 8f1eb48758aa (&q

Re: [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue

2015-12-08 Thread Andrew Morton
On Mon, 7 Dec 2015 12:09:06 +0800 Junxiao Bi wrote: > commit 8f1eb48758aa ("ocfs2: fix umask ignored issue") introduced an issue, > SGID of sub dir was not inherited from its parents dir. It is because SGID > is set into "inode->i_mode" in ocfs2_get_init_inode(), but is

Re: [Ocfs2-devel] [PATCH] ocfs2: fix BUG due to uncleaned localalloc during mount

2015-12-01 Thread Andrew Morton
On Tue, 1 Dec 2015 16:02:55 +0800 Junxiao Bi wrote: > On 11/24/2015 09:38 PM, Joseph Qi wrote: > > Tariq has reported a BUG before and posted a fix at: > > https://oss.oracle.com/pipermail/ocfs2-devel/2015-April/010696.html > > > > This is because during umount,

Re: [Ocfs2-devel] [PATCH 1/4] ocfs2: fix ip_unaligned_aio deadlock with dio work queue

2015-11-23 Thread Andrew Morton
On Fri, 20 Nov 2015 16:23:16 +0800 Ryan Ding wrote: > In the current implementation of unaligned aio+dio, lock order behave as > follow: > > in user process context: > -> call io_submit() > -> get i_mutex > <== window1 > -> get ip_unaligned_aio >

Re: [Ocfs2-devel] simplify configfs attributes V2

2015-10-05 Thread Andrew Morton
On Sat, 3 Oct 2015 15:32:36 +0200 Christoph Hellwig wrote: > This series consolidates the code to implement configfs attributes > by providing the ->show and ->store method in common code and using > container_of in the methods to access the containing structure. > > This reduces

Re: [Ocfs2-devel] [PATCH] ocfs2: Fill-in the unused portion of the block with zeros by dio_zero_block()

2015-09-14 Thread Andrew Morton
On Wed, 9 Sep 2015 09:55:16 +0800 jiangyiwen wrote: > A simplified test case is (this case from Ryan): > 1) dd if=/dev/zero of=/mnt/hello bs=512 count=1 oflag=direct; > 2) truncate /mnt/hello -s 2097152 > file 'hello' is not exist before test. After this command, > file

Re: [Ocfs2-devel] [PATCH] ocfs2: Fill-in the unused portion of the block with zeros by dio_zero_block()

2015-09-14 Thread Andrew Morton
On Thu, 10 Sep 2015 09:53:11 +0800 ryding wrote: > Hi Yiwen, > > I'm working on this issue. The patch will be send out soon. And the > issue that do not support file hole will be fixed too. I have proved it > can pass all ltp-aiodio test cases, and has better

Re: [Ocfs2-devel] [PATCH] ocfs2_direct_IO_write misses ocfs2_is_overwrite error code

2015-09-11 Thread Andrew Morton
On Mon, 7 Sep 2015 10:11:56 +0800 "Norton.Zhu" wrote: > If ocfs2_is_overwrite failed, ocfs2_direct_IO_write mays till return success > to the caller. > > ... > > --- a/aops.c > +++ b/aops.c > @@ -847,6 +847,7 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb, >

Re: [Ocfs2-devel] [patch 11/28] ocfs2: extend enough credits for freeing one truncate record while replaying truncate records

2015-09-01 Thread Andrew Morton
On Tue, 1 Sep 2015 10:54:03 -0700 Mark Fasheh wrote: > > > Why is this particular change here? > > > --Mark > > > > > I think Joyce wants to get enough credits at first and then call > > ocfs2_replay_truncate_records. > > Oh ok I see. That's fine then, the patch otherwise

Re: [Ocfs2-devel] ocfs2 pending patch review

2015-08-26 Thread Andrew Morton
On Fri, 21 Aug 2015 14:39:55 -0700 Andrew Morton a...@linux-foundation.org wrote: Guys, we're really getting behind with this and I'm sitting on a large number of rather old patches. So can we please get down, review this code and make a decision one way or the other? Here's the list

Re: [Ocfs2-devel] [PATCH] ocfs2: direct write will call ocfs2_rw_unlock() twice when doing aio+dio

2015-08-24 Thread Andrew Morton
: Al Viro v...@zeniv.linux.org.uk Cc: Mark Fasheh mfas...@suse.com Cc: Joel Becker jl...@evilplan.org Cc: sta...@vger.kernel.org Signed-off-by: Andrew Morton a...@linux-foundation.org --- fs/ocfs2/file.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff

[Ocfs2-devel] ocfs2 pending patch review

2015-08-21 Thread Andrew Morton
Guys, we're really getting behind with this and I'm sitting on a large number of rather old patches. So can we please get down, review this code and make a decision one way or the other? Here's the list of 24 patches I shall send out, along with a few notes:

Re: [Ocfs2-devel] [PATCH] ocfs2: fix shift left overflow

2015-07-28 Thread Andrew Morton
On Wed, 29 Jul 2015 08:30:59 +0800 Joseph Qi joseph...@huawei.com wrote: On 2015/7/29 4:51, Andrew Morton wrote: On Mon, 27 Jul 2015 11:39:16 +0800 Joseph Qi joseph...@huawei.com wrote: cluster pos is defined as u32, when calculate corresponding sector it should be converted to u64

Re: [Ocfs2-devel] [PATCH] ocfs2: fix shift left overflow

2015-07-28 Thread Andrew Morton
On Mon, 27 Jul 2015 11:39:16 +0800 Joseph Qi joseph...@huawei.com wrote: cluster pos is defined as u32, when calculate corresponding sector it should be converted to u64 first, otherwise it may overflow. What are the runtime effects of this change? Please always include this info when fixing

Re: [Ocfs2-devel] [patch -next] ocfs2: scheduling in atomic in ocfs2_filecheck_store()

2015-07-27 Thread Andrew Morton
On Mon, 27 Jul 2015 11:27:23 +0300 Dan Carpenter dan.carpen...@oracle.com wrote: We're hold spin_lock(ent-fs_fcheck-fc_lock) so the allocation has to be GFP_ATOMIC. I changed the sizeof() because otherwise the line goes over the 80 character limit and also the new way is prefered kernel

Re: [Ocfs2-devel] [PATCH 0/4] ocfs2: add online file check feature

2015-07-09 Thread Andrew Morton
On Wed, 24 Jun 2015 13:24:17 +0800 Gang He g...@suse.com wrote: When there are errors in the ocfs2 filesystem, they are usually accompanied by the inode number which caused the error. This inode number would be the input to fixing the file. One of these options could be considered: A file in

Re: [Ocfs2-devel] [PATCH v2] ocfs2: do not BUG if jbd2_journal_dirty_metadata fails

2015-05-12 Thread Andrew Morton
On Tue, 12 May 2015 09:53:47 +0800 Joseph Qi joseph...@huawei.com wrote: jbd2_journal_dirty_metadata may fail. Currently it cannot take care of non zero return value and just BUG in ocfs2_journal_dirty. This patch is aborting the handle and journal instead of BUG. This patch is internally

Re: [Ocfs2-devel] [PATCH] ocfs2: fix BUG in ocfs2_downconvert_thread_do_work

2015-05-06 Thread Andrew Morton
On Wed, 6 May 2015 19:12:54 +0800 Joseph Qi joseph...@huawei.com wrote: BUG_ON(list_empty(osb-blocked_lock_list)) in ocfs2_downconvert_thread_do_work can be triggered in the following case: ocfs2dc has firstly saved osb-blocked_lock_count to local varibale processed, and then processes the

Re: [Ocfs2-devel] [PATCH RESEND] ocfs2: use retval instead of status for checking error

2015-05-02 Thread Andrew Morton
On Sun, 3 May 2015 12:02:39 +0900 DaeSeok Youn daeseok.y...@gmail.com wrote: 2015-04-24 10:45 GMT+09:00 Daeseok Youn daeseok.y...@gmail.com: The use of 'status' in __ocfs2_add_entry() can return wrong value. Some functions' return value in __ocfs2_add_entry(), i.e ocfs2_journal_access_di()

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: fix race between purge and get lock resource

2015-04-28 Thread Andrew Morton
On Sat, 25 Apr 2015 15:05:15 +0800 Joseph Qi joseph...@huawei.com wrote: There is a race between purge and get lock resource, which will lead to ast unfinished and system hung. The case is described below: mkdir dlm_thread

Re: [Ocfs2-devel] [PATCH V3] ocfs2: return error while ocfs2_figure_merge_contig_type failing

2015-04-28 Thread Andrew Morton
On Sat, 25 Apr 2015 17:18:27 +0800 Xue jiufei xuejiu...@huawei.com wrote: Now function ocfs2_figure_merge_contig_type() still return CONTIG_NONE when some error occurs which will cause unpredictable error. So return error while ocfs2_figure_merge_contig_type failing. @@ -4336,8 +4336,11 @@

Re: [Ocfs2-devel] [PATCH V2] ocfs2: return error while ocfs2_figure_merge_contig_type failing

2015-04-24 Thread Andrew Morton
On Sat, 25 Apr 2015 10:15:31 +0800 Xue jiufei xuejiu...@huawei.com wrote: Hi andrew, I did this against mainline linux-4.0. That's extremely out of date ;) Do you mean that I should do patch against linux-next tree? current mainline is current Linus git. Or wait for 4.1-rc1.

Re: [Ocfs2-devel] [PATCH V2] ocfs2: return error while ocfs2_figure_merge_contig_type failing

2015-04-22 Thread Andrew Morton
On Wed, 22 Apr 2015 08:36:10 +0800 Xue jiufei xuejiu...@huawei.com wrote: Now function ocfs2_figure_merge_contig_type() still return CONTIG_NONE when some error occurs which will cause unpredictable error. So return error while ocfs2_figure_merge_contig_type failing. Can you please redo this

Re: [Ocfs2-devel] [PATCH next] ocfs2: Reduce object size of mlog uses

2015-04-22 Thread Andrew Morton
On Fri, 17 Apr 2015 00:17:50 -0700 Joe Perches j...@perches.com wrote: Using a function for __mlog_printk instead of a macro reduces the object size of built-in.o more than 120KB, or ~10% overall (x86-64 defconfig with all ocfs2 options) $ size fs/ocfs2/built-in.o* text data

[Ocfs2-devel] ocfs2 patches for review

2015-04-07 Thread Andrew Morton
Nine patches for which I feel additional review/test/etc is needed, please. Some of these are somewhat old - if people think I should just drop them then please say so. ocfs2-trusted-xattr-missing-cap_sys_admin-check.patch - breaks userspace?

Re: [Ocfs2-devel] [PATCH] ocfs2: check if the ocfs2 lock resource be initialized before calling ocfs2_dlm_lock

2015-04-01 Thread Andrew Morton
On Thu, 2 Apr 2015 11:14:38 +0800 alex chen alex.c...@huawei.com wrote: I don't think this is fit for all. In many places it should do cleanup rather than just return the error code. There are about 50 sites which can use this. Can we define a new macro 'mlog_errno_return' as

Re: [Ocfs2-devel] [PATCH] ocfs2: check if the ocfs2 lock resource be initialized before calling ocfs2_dlm_lock

2015-03-31 Thread Andrew Morton
On Wed, 1 Apr 2015 08:43:45 +0800 Joseph Qi joseph...@huawei.com wrote: From: Andrew Morton a...@linux-foundation.org Subject: ocfs2: make mlog_errno return the errno ocfs2 does mlog_errno(v); return v; in many places. Change mlog_errno() so we can do return

Re: [Ocfs2-devel] [PATCH] ocfs2: check if the ocfs2 lock resource be initialized before calling ocfs2_dlm_lock

2015-03-31 Thread Andrew Morton
-l_flags OCFS2_LOCK_INITIALIZED)) { + mlog_errno(-EINVAL); + return -EINVAL; + } hm. How about we do this? From: Andrew Morton a...@linux-foundation.org Subject: ocfs2: make mlog_errno return the errno ocfs2 does mlog_errno(v); return v; in many

Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: Neaten do_error, ocfs2_error and ocfs2_abort

2015-03-27 Thread Andrew Morton
On Thu, 26 Mar 2015 20:07:08 -0700 Joe Perches j...@perches.com wrote: These uses sometimes do and sometimes don't have '\n' terminations. Make the uses consistently use '\n' terminations and remove the newline from the functions. This is going to take a while to merge, as it's backed up

Re: [Ocfs2-devel] [PATCH] ocfs2: trusted xattr missing CAP_SYS_ADMIN check

2015-03-24 Thread Andrew Morton
On Tue, 24 Mar 2015 11:46:32 -0400 Sanidhya Kashyap sanidhya.gat...@gmail.com wrote: The trusted extended attributes are only visible to the process which hvae CAP_SYS_ADMIN capability but the check is missing in ocfs2 xattr_handler trusted list. The check is important because this will be

Re: [Ocfs2-devel] [PATCH 1/4 V2] ocfs2: use retval instead of status for checking error

2015-03-19 Thread Andrew Morton
On Sat, 28 Feb 2015 08:48:40 +0900 Daeseok Youn daeseok.y...@gmail.com wrote: The use of 'status' in __ocfs2_add_entry() can return wrong status when some functions are failed. If ocfs2_journal_access_db() in __ocfs2_add_entry() is failed, that status is saved to 'status' but return

Re: [Ocfs2-devel] [PATCH 1/3] ocfs2: remove unneeded variable 'status'

2015-02-26 Thread Andrew Morton
On Mon, 23 Feb 2015 19:38:10 +0900 Daeseok Youn daeseok.y...@gmail.com wrote: Use 'retval' instead of 'status'. The patch does a lot more than this. It causes __ocfs2_add_entry to propagate error codes which were previously dropped on the floor. Please update the changelog to fully explain

Re: [Ocfs2-devel] [PATCH 1/2] ocfs2: remove useless if statement

2015-02-17 Thread Andrew Morton
On Tue, 17 Feb 2015 16:13:50 +0900 Daeseok Youn daeseok.y...@gmail.com wrote: The Local variable i in for loop is always less then O2CB_MAP_STABILIZE_COUNT. Signed-off-by: Daeseok Youn daeseok.y...@gmail.com --- fs/ocfs2/stack_o2cb.c |4 ++-- 1 files changed, 2 insertions(+), 2

[Ocfs2-devel] ocfs2 patch review for 3.19

2015-02-04 Thread Andrew Morton
Thsi time I have only four patches which I consider need expert review, please. ocfs2-prune-the-dcache-before-deleting-the-dentry-of-directory.patch o2dlm-fix-null-pointer-dereference-in-o2dlm_blocking_ast_wrapper.patch (Joseph Qi had issues)

Re: [Ocfs2-devel] [mmotm:master 396/417] fs/ocfs2/namei.c:2365:1: warning: 'ocfs2_orphan_del' uses dynamic stack allocation

2015-01-26 Thread Andrew Morton
On Sat, 24 Jan 2015 11:49:02 +0800 kbuild test robot fengguang...@intel.com wrote: tree: git://git.cmpxchg.org/linux-mmotm.git master head: c64429bcc60a702f19f5cfdb5c39277863278a8c commit: 98bc024d7e86a52b7c6266f7bf3bac93626f002b [396/417] ocfs2: add functions to add and remove inode in

Re: [Ocfs2-devel] [PATCH v2] ocfs2: fix warning 'ocfs2_orphan_del' uses dynamic stack allocation

2015-01-26 Thread Andrew Morton
On Mon, 26 Jan 2015 11:20:47 +0800 Joseph Qi joseph...@huawei.com wrote: In ocfs2_orphan_del it uses dynamic stack allocation for orphan entry name. Fix it by using dynamic heap allocation. ... --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -2298,18 +2298,22 @@ int

Re: [Ocfs2-devel] [PATCH] ocfs2: add a mount option journal_async_commit on ocfs2 filesystem

2015-01-06 Thread Andrew Morton
On Thu, 25 Dec 2014 10:53:05 +0800 alex chen alex.c...@huawei.com wrote: Add a mount option to support JBD2 feature: JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT. When this feature is opened, journal commit block can be written to disk without waiting for descriptor blocks, which can improve journal

Re: [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access

2015-01-06 Thread Andrew Morton
On Thu, 25 Dec 2014 13:52:16 +0800 Junxiao Bi junxiao...@oracle.com wrote: Variable why is not yet initialized at line 615, fix it. ... --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -569,7 +569,7 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,

Re: [Ocfs2-devel] [PATCH] ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file

2015-01-05 Thread Andrew Morton
On Mon, 22 Dec 2014 09:52:14 +0100 Aron Szabo a...@ubit.hu wrote: 12/19/2014 11:15 PM keltez__ssel, Andrew Morton __rta: On Fri, 19 Dec 2014 18:07:45 +0800 Xue jiufei xuejiu...@huawei.com wrote: In function ocfs2_link(), parent directory inode passed to function

Re: [Ocfs2-devel] [PATCH 1/1 linux-next] ocfs2: remove unnecessary sizeof(char)

2014-12-22 Thread Andrew Morton
On Mon, 22 Dec 2014 20:05:09 +0100 Fabian Frederick f...@skynet.be wrote: sizeof(char) is always 1. ... --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -129,8 +129,8 @@ int ocfs2_compute_replay_slots(struct ocfs2_super *osb) if (osb-replay_map) return 0; -

Re: [Ocfs2-devel] [PATCH] ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file

2014-12-19 Thread Andrew Morton
On Fri, 19 Dec 2014 18:07:45 +0800 Xue jiufei xuejiu...@huawei.com wrote: In function ocfs2_link(), parent directory inode passed to function ocfs2_lookup_ino_from_name() is wrong. Parameter dir is the parent of new_dentry not old_dentry. We should get old_dir from old_dentry and lookup

Re: [Ocfs2-devel] [patch 03/15] ocfs2: call ocfs2_journal_access_di() before ocfs2_journal_dirty() in ocfs2_write_end_nolock()

2014-12-17 Thread Andrew Morton
modification. Signed-off-by: vicky vicky.yangwenf...@huawei.com Cc: Mark Fasheh mfas...@suse.com Cc: Joel Becker jl...@evilplan.org Signed-off-by: Andrew Morton a...@linux-foundation.org --- fs/ocfs2/aops.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff -puN

[Ocfs2-devel] ocfs patches for review

2014-12-15 Thread Andrew Morton
Another round of jolly patch reviewing, please. A number of these patches have been stalled for quite a long time. I have the following notes: o2dlm-fix-null-pointer-dereference-in-o2dlm_blocking_ast_wrapper.patch: - Joseph Qi had issues ocfs2-free-inode-when-i_count-becomes-zero.patch:

Re: [Ocfs2-devel] [PATCH] Remove filesize checks for sync I/O journal commit

2014-11-04 Thread Andrew Morton
On Tue, 4 Nov 2014 09:52:22 -0600 Goldwyn Rodrigues rgold...@suse.de wrote: Filesize is not a good indication that the file needs to be synced. An example where this breaks is: 1. Open the file in O_SYNC|O_RDWR 2. Read a small portion of the file (say 64 bytes) 3. Lseek to starting of the

Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: Fix d_splice_alias() return code checking

2014-10-20 Thread Andrew Morton
On Sun, 19 Oct 2014 12:39:44 +0200 Richard Weinberger rich...@nod.at wrote: d_splice_alias() can return a valid dentry, NULL or an ERR_PTR. Currently the code checks not for ERR_PTR and my oops in ocfs2_dentry_attach_lock(). It's unclear what the second sentence is trying to tell us. The

Re: [Ocfs2-devel] [PATCH 4/7 v4] ocfs2: add and remove inode in orphan dir in ocfs2_direct_IO

2014-10-15 Thread Andrew Morton
On Sat, 11 Oct 2014 20:29:08 +0800 WeiWei Wang wangww...@huawei.com wrote: Add the inode to orphan dir first, and then delete it once append O_DIRECT finished. This is to make sure block allocation and inode size are consistent. ... +static ssize_t ocfs2_direct_IO_write(struct kiocb

Re: [Ocfs2-devel] [PATCH 4/7 v4] ocfs2: add and remove inode in orphan dir in ocfs2_direct_IO

2014-10-15 Thread Andrew Morton
On Wed, 15 Oct 2014 16:42:44 -0700 Andrew Morton a...@linux-foundation.org wrote: On Sat, 11 Oct 2014 20:29:08 +0800 WeiWei Wang wangww...@huawei.com wrote: Add the inode to orphan dir first, and then delete it once append O_DIRECT finished. This is to make sure block allocation

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: call dlm_lockres_put without resource spinlock

2014-10-01 Thread Andrew Morton
On Fri, 26 Sep 2014 16:41:39 +0800 alex chen alex.c...@huawei.com wrote: dlm_lockres_put should be called without res-spinlock, otherwise a deadlock case may happen. spin_lock(res-spinlock) ... dlm_lockres_put -dlm_lockres_release -dlm_print_one_lock_resource

Re: [Ocfs2-devel] [PATCH 0/7] ocfs2: allocate blocks in direct I/O write

2014-09-10 Thread Andrew Morton
On Wed, 10 Sep 2014 20:38:04 +0800 WeiWei Wang wangww...@huawei.com wrote: hi all, In ocfs2 append I/O write and fill holes I/O write situation, blocks have not been allocated yet, so the direct I/O write will fallback to buffer I/O write. Buffer I/O write the data to page cache first, then

[Ocfs2-devel] ocfs2 patches needing review

2014-08-06 Thread Andrew Morton
Can we please cast an eye across this little pile? Subject: ocfs2: do not write error flag to user structure we cannot copy from/to Subject: ocfs2: free inode when i_count becomes zero Subject: ocfs2: o2net: don't shutdown connection when idle timeout Subject: ocfs2: o2net: set tcp user timeout

Re: [Ocfs2-devel] [PATCH] ocfs2: fix journal commit deadlock

2014-07-28 Thread Andrew Morton
On Thu, 24 Jul 2014 16:58:00 +0800 Junxiao Bi junxiao...@oracle.com wrote: For buffer write, page lock will be got in write_begin and released in write_end, in ocfs2_write_end_nolock(), before it unlock the page in ocfs2_free_write_ctxt(), it calls ocfs2_run_deallocs(), this will ask for the

Re: [Ocfs2-devel] [patch 4/8] ocfs2/dlm: do not purge lockres that is queued for assert master

2014-06-20 Thread Andrew Morton
On Mon, 16 Jun 2014 09:26:53 +0800 Xue jiufei xuejiu...@huawei.com wrote: spin_unlock(res-spinlock); diff -puN fs/ocfs2/dlm/dlmthread.c~ocfs2-dlm-do-not-purge-lockres-that-is-queued-for-assert-master fs/ocfs2/dlm/dlmthread.c ---

Re: [Ocfs2-devel] [PATCH 0/3] ocfs2: o2net: fix packets lost issue when reconnect

2014-06-12 Thread Andrew Morton
On Fri, 06 Jun 2014 10:18:43 +0800 Junxiao Bi junxiao...@oracle.com wrote: Hi Mark Andrew, Could you help review this patch list? It's old and we're getting badly behind on ocfs2 reviewing - please resend everything to everyone. Be sure to cc Joseph Qi as he has already commented on the

Re: [Ocfs2-devel] [PATCH] ocfs2: call ocfs2_journal_access_di() before ocfs2_journal_dirty() in ocfs2_write_end_nolock()

2014-06-12 Thread Andrew Morton
On Mon, 9 Jun 2014 20:54:37 +0800 yangwenfang vicky.yangwenf...@huawei.com wrote: @@ -2040,8 +2030,16 @@ out_write_size: di-i_mtime = di-i_ctime = cpu_to_le64(inode-i_mtime.tv_sec); di-i_mtime_nsec = di-i_ctime_nsec = cpu_to_le32(inode-i_mtime.tv_nsec);

Re: [Ocfs2-devel] [PATCH] ocfs2: correctly check the return value of ocfs2_search_extent_list

2014-06-10 Thread Andrew Morton
On Tue, 10 Jun 2014 21:13:31 +0800 Joseph Qi joseph...@huawei.com wrote: ocfs2_search_extent_list may return -1, so we should check the return value in ocfs2_split_and_insert, otherwise it may cause array index out of bound. And ocfs2_search_extent_list can only return value less than

[Ocfs2-devel] ocfs2 patches for review

2014-06-09 Thread Andrew Morton
I'm stuck with the usual handful of patches. My notes: ocfs2-should-add-inode-into-orphan-dir-after-updating-entry-in-ocfs2_rename.patch: needs acks deadlock-when-two-nodes-are-converting-same-lock-from-pr-to-ex-and-idletimeout-closes-conn.patch: needs acks

Re: [Ocfs2-devel] [PATCH] fs: ocfs2: dir.c: Cleaning up uninitialized variables

2014-06-02 Thread Andrew Morton
On Sun, 1 Jun 2014 15:53:04 +0200 Rickard Strandqvist rickard_strandqv...@spectrumdigital.se wrote: There is a risk that the variable will be used without being initialized. um, no there isn't. --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -3738,7 +3738,7 @@ static int

  1   2   >