mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
	gerry@linux.alibaba.com, linux-kernel@vger.kernel.org,
	German Maglione <gmaglione@redhat.com>
Subject: Re: [PATCH] fuse: fix return value of inode_inline_reclaim_one_dmap in error path
Date: Thu, 1 Jun 2023 09:45:52 +0800	[thread overview]
Message-ID: <33fd8e03-7c99-c12d-255d-b7190612379b@linux.alibaba.com> (raw)
In-Reply-To: <ZHeoIFrp303f0E8d@redhat.com>



On 6/1/23 4:03 AM, Vivek Goyal wrote:
> On Mon, Apr 24, 2023 at 08:32:50PM +0800, Jingbo Xu wrote:
>> When range already got reclaimed by somebody else, return NULL so that
>> the caller could retry to allocate or reclaim another range, instead of
>> mistakenly returning the range already got reclaimed and reused by
>> others.
>>
>> Reported-by: Liu Jiang <gerry@linux.alibaba.com>
>> Fixes: 9a752d18c85a ("virtiofs: add logic to free up a memory range")
>> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
> 
> Hi Jingbo,
> 
> This patch looks correct to me.
> 
> Are you able to reproduce the problem? Or you are fixing it based on
> code inspection?

It's spotted by Liu Jiang during code review.  Not tested yet.

> 
> How are you testing this? We don't have virtiofsd DAX implementation yet
> in rust virtiofsd yet. 
> 
> I am not sure how to test this chagne now. We had out of tree patches
> in qemu and now qemu has gotten rid of C version of virtiofsd so these
> patches might not even work now.

Yeah this exception path may not be so easy to be tested as it is only
triggered in the race condition.  I have the old branch (of qemu) with
support for DAX, and maybe I could try to reproduce the exception path
by configuring limited DAX window and heavy IO workload.


-- 
Thanks,
Jingbo

  parent reply	other threads:[~2023-06-01  1:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 12:32 Jingbo Xu
2023-05-17  0:07 ` Jingbo Xu
     [not found] ` <ZHeoIFrp303f0E8d@redhat.com>
2023-06-01  1:45   ` Jingbo Xu [this message]
2023-06-01 11:45     ` Vivek Goyal
2023-06-02  2:01       ` Jingbo Xu
2023-06-20  3:50       ` Jingbo Xu

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=33fd8e03-7c99-c12d-255d-b7190612379b@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=gerry@linux.alibaba.com \
    --cc=gmaglione@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=vgoyal@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®