linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Novotny <minovotn@redhat.com>
To: Ric Wheeler <rwheeler@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] extend e2fsprogs functionality to add EXT2_FLAG_DIRECT option
Date: Tue, 12 Jan 2010 14:23:22 +0100	[thread overview]
Message-ID: <4B4C77CA.3020007@redhat.com> (raw)
In-Reply-To: <4B4C7547.8020309@redhat.com>

On 01/12/2010 02:12 PM, Michal Novotny wrote:
> On 01/12/2010 02:04 PM, Ric Wheeler wrote:
>> On 01/12/2010 08:01 AM, Michal Novotny wrote:
>>> On 01/12/2010 01:46 PM, Christoph Hellwig wrote:
>>>> On Tue, Jan 12, 2010 at 01:30:40PM +0100, Michal Novotny wrote:
>>>>> Not really, pygrub doesn't do any manipulation with file system and
>>>>> also, it's not working on a life file system. It's called before the
>>>>> guest boots up to read information about grub.conf/initrd and 
>>>>> kernel for
>>>>> PV guest and after this is read and selected in pygrub then the 
>>>>> guest is
>>>>> booted using the kernel and initrd extracted from the image (after 
>>>>> which
>>>>> the file is closed). Once again, nothing uses write support and it 
>>>>> was
>>>>> added just to make it use O_DIRECT for both read and write operations
>>>>> but only pygrub uses only read support and O_DIRECT passed here is 
>>>>> the
>>>>> only way to make it use non-cached data.
>>>> So what caches get in the way? From the above it seems the situation
>>>> is the following:
>>>>
>>>> - filesystem N is a guest filesystem. It's not usually mounted on the
>>>> host, except for initial setup long time ago
>>>
>>> Yes, it is really a guest file system. This is not mounted in the host
>>> and the reason is to get actual version of grub.conf, initrd and kernel
>>> to be booted...
>>>
>>>> - before booting a guest your "pygrub" tools needs to read files on
>>>> it, and it's doing so using e2fsprogs
>>>
>>> Correct.
>>>
>>>> - once the guest is life it uses the extN kernel driver to access the
>>>> filesystem
>>>
>>> That's right. So this is no longer pygrub responsibility...
>>>
>>>> nowhere in this cycle you should have any stale cached data. The 
>>>> kernel
>>>> always makes sure to write back data on umount/reboot, as does 
>>>> e2fsprogs
>>>> if actually used to write data (which you said is not the case 
>>>> anyway).
>>>
>>> In fact I was unable to run into those problems myself but
>>> reporter/customer did.
>>>
>>>> The only data that may be in the cache are unmodified data from reads
>>>> on the block device from either e2fsprogs or a suboptimal virtual 
>>>> block
>>>> device implementation, but these can't cause any problems.
>>> Michal
>>
>> If the guest is the only one (when running) that installs a new 
>> grub.conf file and kernel and it shuts down properly, you should be 
>> good. It if does not shut down cleanly, it could have a stale 
>> grub.conf file (or worse, a partially written one), but using 
>> O_DIRECT to bypass the file system cache should not help.
>>
>> If we cannot reproduce this failure, sounds like we need to go back 
>> and get a better understanding of what the customer saw?
>>
>> ric
>>
> That's right. I am going write an e-mail regarding this information to 
> the reproducer if this bug and tell him that I need more information 
> about what's happening at the customer side.
>
One more thing to point out, let's have a look at: 
https://bugzilla.redhat.com/show_bug.cgi?id=466681#c15 .This is about 
workaround to drop caches to be added to pygrub in the host machine 
using this command:

echo 1>  /proc/sys/vm/drop_caches

So this really looks like the caching issue if it's working fine after 
dropping the caches. That may be the reason why this could be fine with 
this patch present in e2fsprogs.

  Michal

  reply	other threads:[~2010-01-12 13:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08  9:36 [PATCH] extend e2fsprogs functionality to add EXT2_FLAG_DIRECT option Michal Novotny
2010-01-11 20:06 ` Ric Wheeler
2010-01-12 10:54   ` Michal Novotny
2010-01-12 11:59     ` Ric Wheeler
2010-01-12 12:15       ` Michal Novotny
2010-01-12 12:23         ` Christoph Hellwig
2010-01-12 12:30           ` Michal Novotny
2010-01-12 12:46             ` Christoph Hellwig
2010-01-12 13:01               ` Michal Novotny
2010-01-12 13:04                 ` Ric Wheeler
2010-01-12 13:12                   ` Michal Novotny
2010-01-12 13:23                     ` Michal Novotny [this message]
2010-01-12 13:29                       ` Ric Wheeler
2010-01-12 13:33                         ` Michal Novotny
2010-01-12 14:33                           ` Chris Lee
2010-01-12 14:37                             ` Michal Novotny
2010-01-12 16:38                 ` Christoph Hellwig
2010-01-12 16:43                   ` Michal Novotny
2010-01-12 16:47                     ` Christoph Hellwig
2010-01-12 16:51                       ` Michal Novotny
2010-01-12 16:50                     ` Ric Wheeler
2010-01-12 16:53                       ` Michal Novotny
2010-01-12 16:56                         ` Eric Sandeen
2010-01-12 16:59                           ` Ric Wheeler
2010-01-12 17:00                             ` Michal Novotny
2010-01-14 13:46                               ` Michal Novotny
2010-01-12 12:47             ` Andreas Dilger
2010-01-12 13:04               ` Michal Novotny
2010-01-12 15:16           ` Eric Sandeen
2010-01-12 15:46             ` Michal Novotny
2010-01-12 20:01               ` Ric Wheeler

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=4B4C77CA.3020007@redhat.com \
    --to=minovotn@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=rwheeler@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;
as well as URLs for NNTP newsgroup(s).