mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Sumitra Sharma <sumitraartsy@gmail.com>,
	Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ira Weiny <ira.weiny@intel.com>, Fabio <fmdefrancesco@gmail.com>,
	Deepak R Varma <drv@mailo.com>
Subject: Re: [PATCH] fs/vboxsf: Replace kmap() with kmap_local_{page, folio}()
Date: Thu, 29 Jun 2023 07:35:37 +0200	[thread overview]
Message-ID: <e055b3e4-22c3-c0e2-fb8b-81ba8b97382d@redhat.com> (raw)
In-Reply-To: <20230629043031.GA455425@sumitra.com>

Hi Sumitra,

On 6/29/23 06:30, Sumitra Sharma wrote:
> On Tue, Jun 27, 2023 at 06:48:20PM +0100, Matthew Wilcox wrote:
>> On Tue, Jun 27, 2023 at 06:51:15AM -0700, Sumitra Sharma wrote:
>>> +++ b/fs/vboxsf/file.c
>>> @@ -234,7 +234,7 @@ static int vboxsf_read_folio(struct file *file, struct folio *folio)
>>>  	u8 *buf;
>>>  	int err;
>>>  
>>> -	buf = kmap(page);
>>> +	buf = kmap_local_folio(folio, off);
>>
>> Did you test this?  'off' is the offset in the _file_.  Whereas
>> kmap_local_folio() takes the offset within the _folio_.  They have
>> different types (loff_t vs size_t) to warn you that they're different
>> things.
>>
> 
> Hi Matthew,
> 
> When creating this patch, I read and searched about the loff_t vs size_t.
> By mistake, I implemented it in the wrong way.
> 
> Also, I did not test it and just compiled it. I apologise for doing so.
> 
> And for the other points you have put as feedback. I will take some time to understand
> it. And would like to work on the changes you suggest.

If you work further on this please make sure that you actually test your
changes. Submitting untested fs changes is a really bad idea. People don't
like it when their data gets corrupted.

Note vboxsf can be tested easily by setting up a VirtualBox guest and then
using the shared folder features. Note do *not* use the VirtualBox provided
guest utils they contain their own out of tree vboxsf implementation and
will use that.

To avoid this you could e.g. use Fedora inside the guest and install
the Fedora packaged vbox guest utils which does not replace the mainline
vboxsf.

Regards,

Hans




  reply	other threads:[~2023-06-29  5:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 13:51 Sumitra Sharma
2023-06-27 14:34 ` Hans de Goede
2023-06-27 17:46   ` Matthew Wilcox
2023-06-27 18:10     ` Hans de Goede
2023-06-27 18:19       ` Hans de Goede
2023-06-27 17:48 ` Matthew Wilcox
2023-06-27 18:04   ` Hans de Goede
2023-06-29  4:30   ` Sumitra Sharma
2023-06-29  5:35     ` Hans de Goede [this message]
2023-06-28 17:15 ` Matthew Wilcox
2023-06-28 22:23   ` Fabio M. De Francesco
2023-06-28 22:40     ` Fabio M. De Francesco
2023-06-29  2:13       ` Ira Weiny
2023-06-29  3:16     ` Matthew Wilcox
2023-06-29 15:04       ` Fabio M. De Francesco
2023-06-29  2:23   ` Ira Weiny
2023-06-29  3:08     ` Matthew Wilcox
2023-06-29  9:28   ` Sumitra Sharma
2023-06-29 10:01     ` Hans de Goede
2023-06-29 14:42     ` Matthew Wilcox
2023-06-29 15:01       ` Hans de Goede

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=e055b3e4-22c3-c0e2-fb8b-81ba8b97382d@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=drv@mailo.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sumitraartsy@gmail.com \
    --cc=willy@infradead.org \
    /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®