linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Partition device synchronisation
Date: Fri, 11 May 2012 09:39:26 -0400	[thread overview]
Message-ID: <x49zk9evnu9.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <4FAC4208.1070308@gmail.com> ("Vladimir 'φ-coder/phcoder' Serbinenko"'s message of "Fri, 11 May 2012 00:32:40 +0200")

"Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com> writes:

> Hello, all. In GRUB we have tools to discover various parameters as to
> how GRUB would see the disks on boot and for this we run the same code
> as we have in boot time in userspace. So most natural for us would be
> accessing whole disks like sda but unfortunately its cache isn't kept
> synchronous with partitions (e.g. sda1), so if FS driver writes
> something to sda1 it won't be visible through sda until pages are
> dropped. Right now in Linux-specific code we try to find which partition
> of sda starts at given sector (e.g. 2048) by trying all partition Linux
> sees in order to read from sda1 rather than sda. The code is ugly and
> sometimes create issues. So my questions are:
> 1) Do we have to issue some ioctl to reload those caches?

You can issue the BLKFLSBUF ioctl.

> 2) Is it considered a bug and should I plunge forward, fix it and send a
> patch?

This is debatable.  See this thread:
  http://thread.gmane.org/gmane.linux.kernel/1241227/focus=1244202

Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-05-11 13:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 22:32 Partition device synchronisation Vladimir 'φ-coder/phcoder' Serbinenko
2012-05-11 13:39 ` Jeff Moyer [this message]
2012-05-11 15:33   ` Vladimir 'φ-coder/phcoder' Serbinenko

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=x49zk9evnu9.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=phcoder@gmail.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).