All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Schubert <aakef@fastmail.fm>
To: Miklos Szeredi <miklos@szeredi.hu>, Bernd Schubert <bschubert@ddn.com>
Cc: linux-fsdevel@vger.kernel.org, bernd.schubert@fastmail.fm,
	dsingh@ddn.com, Hao Xu <howeyxu@tencent.com>
Subject: Re: [PATCH 2/6] fuse: Create helper function if DIO write needs exclusive lock
Date: Wed, 30 Aug 2023 14:13:22 +0200	[thread overview]
Message-ID: <efade42b-2c32-2f22-07a4-7541b60d3c32@fastmail.fm> (raw)
In-Reply-To: <CAJfpegvnxrmU=GgxGxZCh4oyhBk3HrPeWGLqwR7quJ2RPv5JjQ@mail.gmail.com>



On 8/30/23 12:57, Miklos Szeredi wrote:
> On Tue, 29 Aug 2023 at 18:11, Bernd Schubert <bschubert@ddn.com> wrote:
>>
>> This is just a preparation to avoid code duplication in the next
>> commit.
>>
>> Cc: Hao Xu <howeyxu@tencent.com>
>> Cc: Miklos Szeredi <miklos@szeredi.hu>
>> Cc: Dharmendra Singh <dsingh@ddn.com>
>> Signed-off-by: Bernd Schubert <bschubert@ddn.com>
>> ---
>>   fs/fuse/file.c | 48 +++++++++++++++++++++++++++++++++---------------
>>   1 file changed, 33 insertions(+), 15 deletions(-)
>>
>> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
>> index b1b9f2b9a37d..6b8b9512c336 100644
>> --- a/fs/fuse/file.c
>> +++ b/fs/fuse/file.c
>> @@ -1298,6 +1298,37 @@ static ssize_t fuse_perform_write(struct kiocb *iocb, struct iov_iter *ii)
>>          return res;
>>   }
>>
>> +static bool fuse_io_past_eof(struct kiocb *iocb,
>> +                                              struct iov_iter *iter)
>> +{
>> +       struct inode *inode = file_inode(iocb->ki_filp);
>> +
>> +       return iocb->ki_pos + iov_iter_count(iter) > i_size_read(inode);
>> +}
>> +
>> +/*
>> + * @return true if an exclusive lock direct IO writes is needed
>> + */
>> +static bool fuse_dio_wr_exclusive_lock(struct kiocb *iocb, struct iov_iter *from)
>> +{
>> +       struct file *file = iocb->ki_filp;
>> +       struct fuse_file *ff = file->private_data;
>> +
>> +       /* server side has to advise that it supports parallel dio writes */
>> +       if (!(ff->open_flags & FOPEN_PARALLEL_DIRECT_WRITES))
>> +               return false;
> 
> You got the return values the wrong way around.  I can fix this, no
> need to resend.

Ooops, sorry! Do you mind to take this series for next merge round? I 
obviously didn't test the latest series yet and I would like to first 
test performance and do several rounds of xfs tests. That should be done 
by Monday, but might be a bit late for 6.6


Thanks,
Bernd

  reply	other threads:[~2023-08-30 18:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 16:11 [PATCH 0/5 v3] fuse direct write consolidation and parallel IO Bernd Schubert
2023-08-29 16:11 ` [PATCH 1/6] fuse: direct IO can use the write-through code path Bernd Schubert
2023-08-29 16:11 ` [PATCH 2/6] fuse: Create helper function if DIO write needs exclusive lock Bernd Schubert
2023-08-30 10:57   ` Miklos Szeredi
2023-08-30 12:13     ` Bernd Schubert [this message]
2023-08-30 12:14       ` Miklos Szeredi
2023-08-29 16:11 ` [PATCH 3/6] fuse: Allow parallel direct writes for O_DIRECT Bernd Schubert
2023-08-30 13:28   ` Miklos Szeredi
2023-08-30 14:38     ` Bernd Schubert
2023-08-30 14:50       ` Miklos Szeredi
2023-08-31  8:30   ` Hao Xu
2023-08-31  8:33     ` Bernd Schubert
2023-08-29 16:11 ` [PATCH 4/6] fuse: Rename fuse_direct_io Bernd Schubert
2023-08-29 16:11 ` [PATCH 5/6] fuse: Remove fuse_direct_write_iter code path / use IOCB_DIRECT Bernd Schubert
2023-08-31  9:19   ` Hao Xu
2023-08-31  9:34     ` Bernd Schubert
2023-09-01  2:54       ` Hao Xu
2023-08-29 16:11 ` [PATCH 6/6] fuse: Remove page flush/invaliation in fuse_direct_io Bernd Schubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efade42b-2c32-2f22-07a4-7541b60d3c32@fastmail.fm \
    --to=aakef@fastmail.fm \
    --cc=bernd.schubert@fastmail.fm \
    --cc=bschubert@ddn.com \
    --cc=dsingh@ddn.com \
    --cc=howeyxu@tencent.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.