Re: [Cluster-devel] [PATCH RESEND 8/8] dlm: slow down filling up processing queue

2023-10-11 Thread Greg KH
On Tue, Oct 10, 2023 at 06:04:48PM -0400, Alexander Aring wrote: > If there is a burst of message the receive worker will filling up the > processing queue but where are too slow to process dlm messages. This > patch will slow down the receiver worker to keep the buffer on the > socket layer to

Re: [Cluster-devel] [PATCH RESEND 2/8] fs: dlm: Fix the size of a buffer in dlm_create_debug_file()

2023-10-11 Thread Greg KH
On Tue, Oct 10, 2023 at 06:04:42PM -0400, Alexander Aring wrote: > From: Christophe JAILLET > > 8 is not the maximum size of the suffix used when creating debugfs files. > > Let the compiler compute the correct size, and only give a hint about the > longest possible string that is used. > >

Re: [Cluster-devel] [PATCH RESEND 1/8] fs: dlm: Simplify buffer size computation in dlm_create_debug_file()

2023-10-11 Thread Greg KH
On Tue, Oct 10, 2023 at 06:04:41PM -0400, Alexander Aring wrote: > From: Christophe JAILLET > > Use sizeof(name) instead of the equivalent, but hard coded, > DLM_LOCKSPACE_LEN + 8. > > This is less verbose and more future proof. > > Signed-off-by: Christophe JAILLET > Signed-off-by: Alexander

Re: [Cluster-devel] [PATCH RESEND 4/8] dlm: fix creating multiple node structures

2023-10-11 Thread Greg KH
On Tue, Oct 10, 2023 at 06:04:44PM -0400, Alexander Aring wrote: > This patch will lookup existing nodes instead of always creating them > when dlm_midcomms_addr() is called. The idea is here to create midcomms > nodes when user space getting informed that nodes joins the cluster. This > is the

Re: [Cluster-devel] [PATCH RESEND 3/8] fs: dlm: Remove some useless memset()

2023-10-11 Thread Greg KH
On Tue, Oct 10, 2023 at 06:04:43PM -0400, Alexander Aring wrote: > From: Christophe JAILLET > > There is no need to clear the buffer used to build the file name. > > snprintf() already guarantees that it is NULL terminated and such a > (useless) precaution was not done for the first string (i.e

[Cluster-devel] [PATCH RESEND 6/8] dlm: be sure we reset all nodes at forced shutdown

2023-10-10 Thread Alexander Aring
In case we running in a force shutdown in either midcomms or lowcomms implementation we will make sure we reset all per midcomms node information. Cc: sta...@vger.kernel.org Fixes: 63e711b08160 ("fs: dlm: create midcomms nodes when configure") Signed-off-by: Alexander Aring ---

[Cluster-devel] [PATCH RESEND 5/8] dlm: fix remove member after close call

2023-10-10 Thread Alexander Aring
The idea of commit 63e711b08160 ("fs: dlm: create midcomms nodes when configure") is to set the midcomms node lifetime when a node joins or leaves the cluster. Currently we can hit the following warning: [10844.611495] [ cut here ] [10844.615913] WARNING: CPU: 4 PID: 84304

[Cluster-devel] [PATCH RESEND 7/8] dlm: fix no ack after final message

2023-10-10 Thread Alexander Aring
In case of an final DLM message we can't should not send an ack out after the final message. This patch moves the ack message before the messages will be transmitted. If it's the final message and the receiving node turns into DLM_CLOSED state another ack messages will being received and turning

[Cluster-devel] [PATCH RESEND 8/8] dlm: slow down filling up processing queue

2023-10-10 Thread Alexander Aring
If there is a burst of message the receive worker will filling up the processing queue but where are too slow to process dlm messages. This patch will slow down the receiver worker to keep the buffer on the socket layer to tell the sender to backoff. This is done by a threshold to get the next

[Cluster-devel] [PATCH RESEND 1/8] fs: dlm: Simplify buffer size computation in dlm_create_debug_file()

2023-10-10 Thread Alexander Aring
From: Christophe JAILLET Use sizeof(name) instead of the equivalent, but hard coded, DLM_LOCKSPACE_LEN + 8. This is less verbose and more future proof. Signed-off-by: Christophe JAILLET Signed-off-by: Alexander Aring --- fs/dlm/debug_fs.c | 10 +- 1 file changed, 5 insertions(+), 5

[Cluster-devel] [PATCH RESEND 3/8] fs: dlm: Remove some useless memset()

2023-10-10 Thread Alexander Aring
From: Christophe JAILLET There is no need to clear the buffer used to build the file name. snprintf() already guarantees that it is NULL terminated and such a (useless) precaution was not done for the first string (i.e ls_debug_rsb_dentry) So, save a few LoC. Signed-off-by: Christophe JAILLET

[Cluster-devel] [PATCH RESEND 4/8] dlm: fix creating multiple node structures

2023-10-10 Thread Alexander Aring
This patch will lookup existing nodes instead of always creating them when dlm_midcomms_addr() is called. The idea is here to create midcomms nodes when user space getting informed that nodes joins the cluster. This is the case when dlm_midcomms_addr() is called, however it can be called multiple

[Cluster-devel] [PATCH RESEND 2/8] fs: dlm: Fix the size of a buffer in dlm_create_debug_file()

2023-10-10 Thread Alexander Aring
From: Christophe JAILLET 8 is not the maximum size of the suffix used when creating debugfs files. Let the compiler compute the correct size, and only give a hint about the longest possible string that is used. When building with W=1, this fixes the following warnings: fs/dlm/debug_fs.c: In

[Cluster-devel] [PATCH 12/29] gfs2: move gfs2_xattr_handlers_max to .rodata

2023-10-03 Thread Wedson Almeida Filho
From: Wedson Almeida Filho This makes it harder for accidental or malicious changes to gfs2_xattr_handlers_max at runtime. Cc: Bob Peterson Cc: Andreas Gruenbacher Cc: cluster-devel@redhat.com Signed-off-by: Wedson Almeida Filho --- fs/gfs2/super.h | 4 ++-- fs/gfs2/xattr.c | 4 ++-- 2

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jan Kara
On Wed 20-09-23 10:12:03, Jeff Layton wrote: > On Wed, 2023-09-20 at 14:48 +0200, Jan Kara wrote: > > On Wed 20-09-23 06:35:18, Jeff Layton wrote: > > > On Wed, 2023-09-20 at 12:17 +0200, Jan Kara wrote: > > > > If I were a sysadmin, I'd rather opt for something like > > > > finegrained timestamps

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
On Wed, 2023-09-20 at 16:53 +0200, Christian Brauner wrote: > > You could put it behind an EXPERIMENTAL Kconfig option so that the > > code stays in and can be used by the brave or foolish while it is > > still being refined. > > Given that the discussion has now fully gone back to the drawing

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jan Kara
On Wed 20-09-23 16:53:26, Christian Brauner wrote: > > You could put it behind an EXPERIMENTAL Kconfig option so that the > > code stays in and can be used by the brave or foolish while it is > > still being refined. > > Given that the discussion has now fully gone back to the drawing board > and

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Christian Brauner
> You could put it behind an EXPERIMENTAL Kconfig option so that the > code stays in and can be used by the brave or foolish while it is > still being refined. Given that the discussion has now fully gone back to the drawing board and this is a regression the honest thing to do is to revert the

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
On Wed, 2023-09-20 at 14:48 +0200, Jan Kara wrote: > On Wed 20-09-23 06:35:18, Jeff Layton wrote: > > On Wed, 2023-09-20 at 12:17 +0200, Jan Kara wrote: > > > If I were a sysadmin, I'd rather opt for something like > > > finegrained timestamps + lazytime (if I needed the finegrained timestamps > >

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Chuck Lever III
> On Sep 20, 2023, at 7:48 AM, Christian Brauner wrote: > While we initially thought we can do this unconditionally it turns out that this might break existing workloads that rely on timestamps in very specific ways and we always knew this was a possibility. Move

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Bruno Haible
Jeff Layton wrote: > > Surely this is a safe choice as it moves the responsibility to the sysadmin > > and the cases where finegrained timestamps are required. But I kind of > > wonder how is the sysadmin going to decide whether mgtime is safe for his > > system or not? Because the possible

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Christian Brauner
> I don't, actually. I'm just mentioning that it's possible if we find the > mount option to be unpalatable. Ok. > > > @Jan, what do you think? > > > > > My plan was to take a stab at doing this for a later kernel release. > > > > Ok. > > If it works out, then we may be able to eventually

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jan Kara
On Wed 20-09-23 12:30:52, Christian Brauner wrote: > On Wed, Sep 20, 2023 at 12:17:31PM +0200, Jan Kara wrote: > > On Wed 20-09-23 10:41:30, Christian Brauner wrote: > > > > > f1 was last written to *after* f2 was last written to. If the > > > > > timestamp of f1 > > > > > is then lower than the

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jan Kara
On Wed 20-09-23 06:35:18, Jeff Layton wrote: > On Wed, 2023-09-20 at 12:17 +0200, Jan Kara wrote: > > If I were a sysadmin, I'd rather opt for something like > > finegrained timestamps + lazytime (if I needed the finegrained timestamps > > functionality). That should avoid the IO overhead of

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
On Wed, 2023-09-20 at 14:08 +0200, Christian Brauner wrote: > > I wasn't proposing to do that work for v6.6. For that, we absolutely > > either need the mount option or to just revert the mgtime conversions. > > This sounds like you want me to do a full-on revert of your series but > why? The

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Christian Brauner
> I wasn't proposing to do that work for v6.6. For that, we absolutely > either need the mount option or to just revert the mgtime conversions. This sounds like you want me to do a full-on revert of your series but why? The conversion and changes support an actual use-case and are fine. It's a

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Christian Brauner
> > > While we initially thought we can do this unconditionally it turns out > > > that this might break existing workloads that rely on timestamps in very > > > specific ways and we always knew this was a possibility. Move > > > multi-grain timestamps behind a vfs mount option. > > > > Surely

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
On Wed, 2023-09-20 at 13:48 +0200, Christian Brauner wrote: > > > > While we initially thought we can do this unconditionally it turns out > > > > that this might break existing workloads that rely on timestamps in very > > > > specific ways and we always knew this was a possibility. Move > > > >

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Christian Brauner
On Wed, Sep 20, 2023 at 12:17:31PM +0200, Jan Kara wrote: > On Wed 20-09-23 10:41:30, Christian Brauner wrote: > > > > f1 was last written to *after* f2 was last written to. If the timestamp > > > > of f1 > > > > is then lower than the timestamp of f2, timestamps are fundamentally > > > >

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jan Kara
On Wed 20-09-23 10:41:30, Christian Brauner wrote: > > > f1 was last written to *after* f2 was last written to. If the timestamp > > > of f1 > > > is then lower than the timestamp of f2, timestamps are fundamentally > > > broken. > > > > > > Many things in user-space depend on timestamps, such

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jan Kara
On Tue 19-09-23 12:31:08, Jeff Layton wrote: > On Tue, 2023-09-19 at 16:52 +0200, Bruno Haible wrote: > > Jeff Layton wrote: > > > I'm not sure what we can do for this test. The nap() function is making > > > an assumption that the timestamp granularity will be constant, and that > > > isn't

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
On Wed, 2023-09-20 at 12:17 +0200, Jan Kara wrote: > On Wed 20-09-23 10:41:30, Christian Brauner wrote: > > > > f1 was last written to *after* f2 was last written to. If the timestamp > > > > of f1 > > > > is then lower than the timestamp of f2, timestamps are fundamentally > > > > broken. > > >

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
On Wed, 2023-09-20 at 10:41 +0200, Christian Brauner wrote: > > > f1 was last written to *after* f2 was last written to. If the timestamp > > > of f1 > > > is then lower than the timestamp of f2, timestamps are fundamentally > > > broken. > > > > > > Many things in user-space depend on

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Paul Eggert
On 2023-09-19 09:31, Jeff Layton wrote: The typical case for make timestamp comparisons is comparing source files vs. a build target. If those are being written nearly simultaneously, then that could be an issue, but is that a typical behavior? I vaguely remember running into problems with

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Christian Brauner
> > f1 was last written to *after* f2 was last written to. If the timestamp of > > f1 > > is then lower than the timestamp of f2, timestamps are fundamentally broken. > > > > Many things in user-space depend on timestamps, such as build system > > centered around 'make', but also 'find ...

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Xi Ruoyao
On Wed, 2023-09-20 at 10:41 +0200, Christian Brauner wrote: > > > f1 was last written to *after* f2 was last written to. If the timestamp > > > of f1 > > > is then lower than the timestamp of f2, timestamps are fundamentally > > > broken. > > > > > > Many things in user-space depend on

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 13:10 -0700, Paul Eggert wrote: > On 2023-09-19 09:31, Jeff Layton wrote: > > The typical case for make > > timestamp comparisons is comparing source files vs. a build target. If > > those are being written nearly simultaneously, then that could be an > > issue, but is that a

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 16:52 +0200, Bruno Haible wrote: > Jeff Layton wrote: > > I'm not sure what we can do for this test. The nap() function is making > > an assumption that the timestamp granularity will be constant, and that > > isn't necessarily the case now. > > This is only of secondary

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Bruno Haible
Jeff Layton wrote: > I'm not sure what we can do for this test. The nap() function is making > an assumption that the timestamp granularity will be constant, and that > isn't necessarily the case now. This is only of secondary importance, because the scenario by Jan Kara shows a much more

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 13:04 +0200, Jan Kara wrote: > On Tue 19-09-23 15:05:24, Xi Ruoyao wrote: > > On Mon, 2023-08-07 at 15:38 -0400, Jeff Layton wrote: > > > Enable multigrain timestamps, which should ensure that there is an > > > apparent change to the timestamp whenever it has been written

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jan Kara
On Tue 19-09-23 15:05:24, Xi Ruoyao wrote: > On Mon, 2023-08-07 at 15:38 -0400, Jeff Layton wrote: > > Enable multigrain timestamps, which should ensure that there is an > > apparent change to the timestamp whenever it has been written after > > being actively observed via getattr. > > > > For

Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Xi Ruoyao
On Mon, 2023-08-07 at 15:38 -0400, Jeff Layton wrote: > Enable multigrain timestamps, which should ensure that there is an > apparent change to the timestamp whenever it has been written after > being actively observed via getattr. > > For ext4, we only need to enable the FS_MGTIME flag. Hi

Re: [Cluster-devel] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-09-13 Thread Christian Brauner
On Wed, Sep 13, 2023 at 01:00:10PM +0200, Christoph Hellwig wrote: > > direct_write_fallback(): on error revert the ->ki_pos update from buffered > > write > > Al, Christian: can you send this fix on top Linus? Wasn't aware of this, sorry. I've picked it up and placed it with another set of

Re: [Cluster-devel] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-09-13 Thread Christoph Hellwig
> direct_write_fallback(): on error revert the ->ki_pos update from buffered > write Al, Christian: can you send this fix on top Linus?

[Cluster-devel] [PATCH v6 09/45] gfs2: dynamically allocate the gfs2-qd shrinker

2023-09-11 Thread Qi Zheng
Use new APIs to dynamically allocate the gfs2-qd shrinker. Signed-off-by: Qi Zheng Reviewed-by: Muchun Song CC: Bob Peterson CC: Andreas Gruenbacher CC: cluster-devel@redhat.com --- fs/gfs2/main.c | 6 +++--- fs/gfs2/quota.c | 25 +++-- fs/gfs2/quota.h | 3 ++- 3 files

[Cluster-devel] [PATCH v6 08/45] gfs2: dynamically allocate the gfs2-glock shrinker

2023-09-11 Thread Qi Zheng
Use new APIs to dynamically allocate the gfs2-glock shrinker. Signed-off-by: Qi Zheng Reviewed-by: Muchun Song CC: Bob Peterson CC: Andreas Gruenbacher CC: cluster-devel@redhat.com --- fs/gfs2/glock.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git

Re: [Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-09-10 Thread Dave Chinner
On Fri, Sep 08, 2023 at 01:29:55AM +0100, Pavel Begunkov wrote: > On 9/3/23 23:30, Dave Chinner wrote: > > On Wed, Aug 30, 2023 at 02:11:31PM +0800, Hao Xu wrote: > > > On 8/29/23 19:53, Matthew Wilcox wrote: > > > > On Tue, Aug 29, 2023 at 03:46:13PM +0800, Hao Xu wrote: > > > > > On 8/28/23

Re: [Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-09-08 Thread Pavel Begunkov
On 9/3/23 23:30, Dave Chinner wrote: On Wed, Aug 30, 2023 at 02:11:31PM +0800, Hao Xu wrote: On 8/29/23 19:53, Matthew Wilcox wrote: On Tue, Aug 29, 2023 at 03:46:13PM +0800, Hao Xu wrote: On 8/28/23 05:32, Matthew Wilcox wrote: On Sun, Aug 27, 2023 at 09:28:31PM +0800, Hao Xu wrote: From:

[Cluster-devel] [PATCH dlm/next 3/6] dlm: be sure we reset all nodes at forced shutdown

2023-09-06 Thread Alexander Aring
In case we running in a force shutdown in either midcomms or lowcomms implementation we will make sure we reset all per midcomms node information. Cc: sta...@vger.kernel.org Fixes: 63e711b08160 ("fs: dlm: create midcomms nodes when configure") Signed-off-by: Alexander Aring ---

[Cluster-devel] [PATCH dlm/next 5/6] dlm: fix string may be truncated

2023-09-06 Thread Alexander Aring
This patch is fixing the following compiler warning when compiling with -Wformat-truncation: fs/dlm/debug_fs.c:1031:50: warning: '_queued_asts' directive output may be truncated writing 12 bytes into a region of size between 8 and 72 We simple increase the additional amount of bytes to 13

[Cluster-devel] [PATCH dlm/next 2/6] dlm: fix remove member after close call

2023-09-06 Thread Alexander Aring
The idea of commit 63e711b08160 ("fs: dlm: create midcomms nodes when configure") is to set the midcomms node lifetime when a node joins or leaves the cluster. Currently we can hit the following warning: [10844.611495] [ cut here ] [10844.615913] WARNING: CPU: 4 PID: 84304

[Cluster-devel] [PATCH dlm/next 6/6] dlm: slow down filling up processing queue

2023-09-06 Thread Alexander Aring
If there is a burst of message the receive worker will filling up the processing queue but where are too slow to process dlm messages. This patch will slow down the receiver worker to keep the buffer on the socket layer to tell the sender to backoff. This is done by a threshold to get the next

[Cluster-devel] [PATCH dlm/next 1/6] dlm: fix creating multiple node structures

2023-09-06 Thread Alexander Aring
This patch will lookup existing nodes instead of always creating them when dlm_midcomms_addr() is called. The idea is here to create midcomms nodes when user space getting informed that nodes joins the cluster. This is the case when dlm_midcomms_addr() is called, however it can be called multiple

[Cluster-devel] [PATCH dlm/next 4/6] dlm: fix no ack after final message

2023-09-06 Thread Alexander Aring
In case of an final DLM message we can't should not send an ack out after the final message. This patch moves the ack message before the messages will be transmitted. If it's the final message and the receiving node turns into DLM_CLOSED state another ack messages will being received and turning

Re: [Cluster-devel] [PATCH 2/2] MAINTAINERS: Update dlm mailing list

2023-09-05 Thread David Teigland
On Thu, Aug 31, 2023 at 10:57:49AM +0100, Andrew Price wrote: > The new gfs2@ list will also be used for dlm development. > > Signed-off-by: Andrew Price Ack, thanks. > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS >

Re: [Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-09-04 Thread Christian Brauner
On Sun, Aug 27, 2023 at 09:28:31PM +0800, Hao Xu wrote: > From: Hao Xu > > Add a boolean parameter for file_accessed() to support nowait semantics. > Currently it is true only with io_uring as its initial caller. > > Signed-off-by: Hao Xu > --- > arch/s390/hypfs/inode.c | 2 +- > block/fops.c

Re: [Cluster-devel] [PATCH v6 00/11] io_uring getdents

2023-09-04 Thread Christian Brauner
On Sun, Aug 27, 2023 at 09:28:24PM +0800, Hao Xu wrote: For the future it would be helpful to hold of on sending larger series that like this until a stable tag is out. Right now this series is generating a bunch of merge conflicts because of all the changes to relevant codepaths that got

Re: [Cluster-devel] [PATCH 10/11] vfs: trylock inode->i_rwsem in iterate_dir() to support nowait

2023-09-04 Thread Christian Brauner
On Sun, Aug 27, 2023 at 09:28:34PM +0800, Hao Xu wrote: > From: Hao Xu > > Trylock inode->i_rwsem in iterate_dir() to support nowait semantics and > error out -EAGAIN when there is contention. > > Signed-off-by: Hao Xu > --- Unreviewable until you rebased on -rc1 as far as I'm concerned

Re: [Cluster-devel] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-09-03 Thread Dave Chinner
On Sun, Aug 27, 2023 at 09:28:26PM +0800, Hao Xu wrote: > From: Hao Xu > > Implement NOWAIT semantics for readdir. Return EAGAIN error to the > caller if it would block, like failing to get locks, or going to > do IO. > > Co-developed-by: Dave Chinner Not really. "Co-developed" implies equal

Re: [Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-09-03 Thread Dave Chinner
On Wed, Aug 30, 2023 at 02:11:31PM +0800, Hao Xu wrote: > On 8/29/23 19:53, Matthew Wilcox wrote: > > On Tue, Aug 29, 2023 at 03:46:13PM +0800, Hao Xu wrote: > > > On 8/28/23 05:32, Matthew Wilcox wrote: > > > > On Sun, Aug 27, 2023 at 09:28:31PM +0800, Hao Xu wrote: > > > > > From: Hao Xu > > >

[Cluster-devel] [PATCH 1/2] MAINTAINERS: Update gfs2 mailing list

2023-08-31 Thread Andrew Price
Signed-off-by: Andrew Price --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 4b8d634f3a4e..caae31fb9741 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8725,7 +8725,7 @@ F:scripts/get_maintainer.pl GFS2 FILE SYSTEM M:

[Cluster-devel] [PATCH 2/2] MAINTAINERS: Update dlm mailing list

2023-08-31 Thread Andrew Price
The new gfs2@ list will also be used for dlm development. Signed-off-by: Andrew Price --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index caae31fb9741..946fcf6c8d77 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6093,7 +6093,7 @@

Re: [Cluster-devel] [PATCH 6/7] dlm: use FL_SLEEP to determine blocking vs non-blocking

2023-08-30 Thread Jeff Layton
On Wed, 2023-08-30 at 08:38 -0400, Alexander Aring wrote: > Hi, > > On Fri, Aug 25, 2023 at 2:18 PM Jeff Layton wrote: > > > > On Wed, 2023-08-23 at 17:33 -0400, Alexander Aring wrote: > > > This patch uses the FL_SLEEP flag in struct file_lock to determine if > > > the lock request is a

Re: [Cluster-devel] [PATCH 1/7] lockd: introduce safe async lock op

2023-08-30 Thread Chuck Lever
On Wed, Aug 30, 2023 at 08:32:43AM -0400, Alexander Aring wrote: > Hi, > > On Fri, Aug 25, 2023 at 1:21 PM Chuck Lever wrote: > > > > On Wed, Aug 23, 2023 at 05:33:46PM -0400, Alexander Aring wrote: > > > This patch reverts mostly commit 40595cdc93ed ("nfs: block notification > > > on fs with

Re: [Cluster-devel] [PATCH 6/7] dlm: use FL_SLEEP to determine blocking vs non-blocking

2023-08-30 Thread Alexander Aring
Hi, On Fri, Aug 25, 2023 at 2:18 PM Jeff Layton wrote: > > On Wed, 2023-08-23 at 17:33 -0400, Alexander Aring wrote: > > This patch uses the FL_SLEEP flag in struct file_lock to determine if > > the lock request is a blocking or non-blocking request. Before dlm was > > using IS_SETLKW() was

Re: [Cluster-devel] [PATCH 1/7] lockd: introduce safe async lock op

2023-08-30 Thread Alexander Aring
Hi, On Fri, Aug 25, 2023 at 1:21 PM Chuck Lever wrote: > > On Wed, Aug 23, 2023 at 05:33:46PM -0400, Alexander Aring wrote: > > This patch reverts mostly commit 40595cdc93ed ("nfs: block notification > > on fs with its own ->lock") and introduces an EXPORT_OP_SAFE_ASYNC_LOCK > > export flag to

Re: [Cluster-devel] [PATCH 2/7] lockd: don't call vfs_lock_file() for pending requests

2023-08-30 Thread Alexander Aring
Hi, On Fri, Aug 25, 2023 at 2:10 PM Jeff Layton wrote: > > On Wed, 2023-08-23 at 17:33 -0400, Alexander Aring wrote: > > This patch returns nlm_lck_blocked in nlmsvc_lock() when an asynchronous > > lock request is pending. During testing I ran into the case with the > > side-effects that lockd

Re: [Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-08-30 Thread Hao Xu
On 8/29/23 19:53, Matthew Wilcox wrote: On Tue, Aug 29, 2023 at 03:46:13PM +0800, Hao Xu wrote: On 8/28/23 05:32, Matthew Wilcox wrote: On Sun, Aug 27, 2023 at 09:28:31PM +0800, Hao Xu wrote: From: Hao Xu Add a boolean parameter for file_accessed() to support nowait semantics. Currently it

Re: [Cluster-devel] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Al Viro
On Tue, Aug 29, 2023 at 08:43:31PM -0400, Jeff Layton wrote: > On Wed, 2023-08-30 at 01:02 +0100, Al Viro wrote: > > On Tue, Aug 29, 2023 at 06:58:47PM -0400, Jeff Layton wrote: > > > On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > > > > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton

Re: [Cluster-devel] [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-08-29 Thread Jeff Layton
On Wed, 2023-08-30 at 01:19 +0100, Al Viro wrote: > On Wed, Jul 05, 2023 at 02:58:11PM -0400, Jeff Layton wrote: > > > + * POSIX mandates that the old and new parent directories have their ctime > > and > > + * mtime updated, and that inodes of @old_dentry and @new_dentry (if any), > > have > >

Re: [Cluster-devel] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Jeff Layton
On Wed, 2023-08-30 at 01:02 +0100, Al Viro wrote: > On Tue, Aug 29, 2023 at 06:58:47PM -0400, Jeff Layton wrote: > > On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > > > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > > > > generic_fillattr just fills in the entire stat struct

Re: [Cluster-devel] [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-08-29 Thread Al Viro
On Wed, Jul 05, 2023 at 02:58:11PM -0400, Jeff Layton wrote: > + * POSIX mandates that the old and new parent directories have their ctime > and > + * mtime updated, and that inodes of @old_dentry and @new_dentry (if any), > have > + * their ctime updated. APPLICATION USAGE Some

Re: [Cluster-devel] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Al Viro
On Tue, Aug 29, 2023 at 06:58:47PM -0400, Jeff Layton wrote: > On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > > > generic_fillattr just fills in the entire stat struct indiscriminately > > > today, copying data from the inode.

Re: [Cluster-devel] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Jeff Layton
On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > > generic_fillattr just fills in the entire stat struct indiscriminately > > today, copying data from the inode. There is at least one attribute > > (STATX_CHANGE_COOKIE) that can

Re: [Cluster-devel] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Al Viro
On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > generic_fillattr just fills in the entire stat struct indiscriminately > today, copying data from the inode. There is at least one attribute > (STATX_CHANGE_COOKIE) that can have side effects when it is reported, > and we're looking at

Re: [Cluster-devel] [PATCH] generic: add fcntl corner cases tests

2023-08-29 Thread Alexander Aring
Hi, On Tue, Aug 29, 2023 at 12:43 AM Zorro Lang wrote: > > On Wed, Aug 23, 2023 at 05:08:14PM -0400, Alexander Aring wrote: > > This patch adds generic 730 testcase. It will test on various fcntl() > > The generic/730 has been taken. The case number might be changed when I merge > a patch, so

Re: [Cluster-devel] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-08-29 Thread Matthew Wilcox
On Tue, Aug 29, 2023 at 03:41:43PM +0800, Hao Xu wrote: > On 8/28/23 04:44, Matthew Wilcox wrote: > > > @@ -391,10 +401,17 @@ xfs_dir2_leaf_getdents( > > > bp = NULL; > > > } > > > - if (*lock_mode == 0) > > > -

Re: [Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-08-29 Thread Matthew Wilcox
On Tue, Aug 29, 2023 at 03:46:13PM +0800, Hao Xu wrote: > On 8/28/23 05:32, Matthew Wilcox wrote: > > On Sun, Aug 27, 2023 at 09:28:31PM +0800, Hao Xu wrote: > > > From: Hao Xu > > > > > > Add a boolean parameter for file_accessed() to support nowait semantics. > > > Currently it is true only

[Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-08-29 Thread Hao Xu
From: Hao Xu Add a boolean parameter for file_accessed() to support nowait semantics. Currently it is true only with io_uring as its initial caller. Signed-off-by: Hao Xu --- arch/s390/hypfs/inode.c | 2 +- block/fops.c| 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c

[Cluster-devel] [PATCH 19/29] xfs: support nowait memory allocation in _xfs_buf_alloc()

2023-08-29 Thread Hao Xu
From: Hao Xu Choose different gfp flags to support nowait memory allocation in _xfs_buf_alloc(). Signed-off-by: Hao Xu --- fs/xfs/xfs_buf.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 9f84bc3b802c..8b800ce28996 100644 ---

[Cluster-devel] [PATCH 06/11] vfs: add a nowait parameter for touch_atime()

2023-08-29 Thread Hao Xu
From: Hao Xu Add a nowait boolean parameter for touch_atime() to support nowait semantics. It is true only when io_uring is the initial caller. Signed-off-by: Hao Xu --- fs/cachefiles/namei.c | 2 +- fs/ecryptfs/file.c| 4 ++-- fs/inode.c| 7 --- fs/namei.c| 4

[Cluster-devel] [PATCH 24/29] xfs: support nowait for xfs_buf_read_map()

2023-08-29 Thread Hao Xu
From: Hao Xu This causes xfstests generic/232 hung in umount process, waiting for ail push, so I comment it for now, need some hints from xfs folks. Not a real patch. Signed-off-by: Hao Xu --- fs/xfs/xfs_buf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/xfs/xfs_buf.c

[Cluster-devel] [PATCH 27/29] xfs: add a comment for xlog_kvmalloc()

2023-08-29 Thread Hao Xu
From: Hao Xu vmalloc() always succeed in 64 bit system? Not a real patch. Signed-off-by: Hao Xu --- fs/xfs/xfs_log_cil.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index f17c1799b3c4..b31830ee36dd 100644 --- a/fs/xfs/xfs_log_cil.c +++

[Cluster-devel] [PATCH 28/29] xfs: support nowait semantics for xc_ctx_lock in xlog_cil_commit()

2023-08-29 Thread Hao Xu
From: Hao Xu Apply trylock logic for xc_ctx_lock in xlog_cil_commit() in nowait case and error out -EAGAIN for xlog_cil_commit(). Signed-off-by: Hao Xu --- fs/xfs/xfs_log_cil.c | 12 ++-- fs/xfs/xfs_log_priv.h | 2 +- fs/xfs/xfs_trans.c| 4 +++- 3 files changed, 14

[Cluster-devel] [PATCH 16/29] xfs: add nowait parameter for xfs_inode_item_init()

2023-08-29 Thread Hao Xu
From: Hao Xu Add nowait parameter for xfs_inode_item_init() to support nowait semantics. Signed-off-by: Hao Xu --- fs/xfs/libxfs/xfs_trans_inode.c | 3 ++- fs/xfs/xfs_inode_item.c | 12 fs/xfs/xfs_inode_item.h | 3 ++- 3 files changed, 12 insertions(+), 6

Re: [Cluster-devel] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-08-29 Thread Hao Xu
On 8/28/23 04:44, Matthew Wilcox wrote: On Sun, Aug 27, 2023 at 09:28:26PM +0800, Hao Xu wrote: +++ b/fs/xfs/libxfs/xfs_da_btree.c @@ -2643,16 +2643,32 @@ xfs_da_read_buf( struct xfs_buf_map map, *mapp = int nmap = 1; int

[Cluster-devel] [PATCH 15/29] xfs: don't wait for free space in xlog_grant_head_check() in nowait case

2023-08-29 Thread Hao Xu
From: Hao Xu Don't sleep and wait for more space for a log ticket in xlog_grant_head_check() when it is in nowait case. Signed-off-by: Hao Xu --- fs/xfs/xfs_log.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index

[Cluster-devel] [PATCH 09/29] vfs: move file_accessed() to the beginning of iterate_dir()

2023-08-29 Thread Hao Xu
From: Hao Xu Move file_accessed() to the beginning of iterate_dir() so that we don't need to rollback all the work done when file_accessed() returns -EAGAIN at the end of getdents. Signed-off-by: Hao Xu --- fs/readdir.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[Cluster-devel] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-08-29 Thread Hao Xu
From: Hao Xu Implement NOWAIT semantics for readdir. Return EAGAIN error to the caller if it would block, like failing to get locks, or going to do IO. Co-developed-by: Dave Chinner Signed-off-by: Dave Chinner Signed-off-by: Hao Xu [fixes deadlock issue, tweak code style] ---

[Cluster-devel] [PATCH 03/29] xfs: add NOWAIT semantics for readdir

2023-08-29 Thread Hao Xu
From: Hao Xu Implement NOWAIT semantics for readdir. Return EAGAIN error to the caller if it would block, like failing to get locks, or going to do IO. Co-developed-by: Dave Chinner Signed-off-by: Dave Chinner Signed-off-by: Hao Xu [fixes deadlock issue, tweak code style] ---

[Cluster-devel] [PATCH 05/29] vfs: add a vfs helper for io_uring file pos lock

2023-08-29 Thread Hao Xu
From: Hao Xu Add a vfs helper file_pos_lock_nowait() for io_uring usage. The function have conditional nowait logic, i.e. if nowait is needed, return -EAGAIN when trylock fails. Signed-off-by: Hao Xu --- fs/file.c| 13 + include/linux/file.h | 2 ++ 2 files changed,

[Cluster-devel] [PATCH 13/29] xfs: make xfs_trans_alloc() support nowait semantics

2023-08-29 Thread Hao Xu
From: Hao Xu There are locks in xfs_trans_alloc(), spot them and apply trylock logic. Make them return -EAGAIN when it would block. To achieve this, add nowait parameter for those functions in the path. Besides, add a generic transaction flag XFS_TRANS_NOWAIT to deliver nowait info.

[Cluster-devel] [PATCH 08/11] vfs: move file_accessed() to the beginning of iterate_dir()

2023-08-29 Thread Hao Xu
From: Hao Xu Move file_accessed() to the beginning of iterate_dir() so that we don't need to rollback all the work done when file_accessed() returns -EAGAIN at the end of getdents. Signed-off-by: Hao Xu --- fs/readdir.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[Cluster-devel] [PATCH 02/29] xfs: rename XBF_TRYLOCK to XBF_NOWAIT

2023-08-29 Thread Hao Xu
From: Hao Xu XBF_TRYLOCK means we need lock but don't block on it, we can use it to stand for not waiting for memory allcation. Rename XBF_TRYLOCK to XBF_NOWAIT, which is more generic. Signed-off-by: Hao Xu --- fs/xfs/libxfs/xfs_alloc.c | 2 +- fs/xfs/libxfs/xfs_attr_remote.c | 2 +-

Re: [Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-08-29 Thread Hao Xu
On 8/28/23 05:32, Matthew Wilcox wrote: On Sun, Aug 27, 2023 at 09:28:31PM +0800, Hao Xu wrote: From: Hao Xu Add a boolean parameter for file_accessed() to support nowait semantics. Currently it is true only with io_uring as its initial caller. So why do we need to do this as part of this

[Cluster-devel] [PATCH 22/29] xfs: comment page allocation for nowait case in xfs_buf_find_insert()

2023-08-29 Thread Hao Xu
From: Hao Xu Add comments for page allocation in nowait case in xfs_buf_find_insert() Signed-off-by: Hao Xu --- fs/xfs/xfs_buf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index eb3cd7702545..57bdc4c5dde1 100644 --- a/fs/xfs/xfs_buf.c +++

[Cluster-devel] [PATCH 18/29] xfs: set XBF_NOWAIT for xfs_buf_read_map if necessary

2023-08-29 Thread Hao Xu
From: Hao Xu Set XBF_NOWAIT for xfs_buf_read_map() if necessary. Signed-off-by: Hao Xu --- fs/xfs/xfs_trans_buf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 6549e50d852c..016371f58f26 100644 --- a/fs/xfs/xfs_trans_buf.c +++

[Cluster-devel] [PATCH 25/29] xfs: support nowait for xfs_buf_item_init()

2023-08-29 Thread Hao Xu
From: Hao Xu support nowait for xfs_buf_item_init() and error out -EAGAIN to _xfs_trans_bjoin() when it would block. Signed-off-by: Hao Xu --- fs/xfs/xfs_buf_item.c | 9 +++-- fs/xfs/xfs_buf_item.h | 2 +- fs/xfs/xfs_buf_item_recover.c | 2 +- fs/xfs/xfs_trans_buf.c

[Cluster-devel] [PATCH 17/29] xfs: make xfs_trans_ijoin() error out -EAGAIN

2023-08-29 Thread Hao Xu
From: Hao Xu Change return value of xfs_trans_ijoin() to error out -EAGAIN. Signed-off-by: Hao Xu --- fs/xfs/libxfs/xfs_trans_inode.c | 13 + fs/xfs/xfs_iops.c | 4 +++- fs/xfs/xfs_trans.h | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff

[Cluster-devel] [PATCH 10/11] vfs: trylock inode->i_rwsem in iterate_dir() to support nowait

2023-08-29 Thread Hao Xu
From: Hao Xu Trylock inode->i_rwsem in iterate_dir() to support nowait semantics and error out -EAGAIN when there is contention. Signed-off-by: Hao Xu --- fs/readdir.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/fs/readdir.c b/fs/readdir.c index

  1   2   3   4   5   6   7   8   9   10   >