From: Kevin Wolf <kwolf@redhat.com>
To: Pintu Kumar <pintu.ping@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Help needed -- vvfat.c
Date: Mon, 19 Sep 2011 16:37:03 +0200 [thread overview]
Message-ID: <4E77538F.3060305@redhat.com> (raw)
In-Reply-To: <CAOuPNLhw4vQ+vxvOxr=Ja7VZbL2OUJe_FLckS-d9gR0XG+Z2tg@mail.gmail.com>
Am 15.09.2011 14:49, schrieb Pintu Kumar:
> Hi,
>
> This is regarding qemu block/vvfat.c.
>
> Currently vvfat scans all directories and sub-directories in the
> beginning during init_directories().
>
> I want to modify vvfat such that it should scan only the TOP directory
> content and not the sub-directory content before mounting.
> And after mounting vvfat I should be able to dynamically get the TOP
> directory content when I do "ls -l" on that directory.
> How can I do that?
>
> I tried skipping sub-directory in read_directory() as follows.
> else if(S_ISDIR(st.st_mode))
> {
> LOGD("Skipping sub-directory : %s\n", buffer);
> s->current_mapping=NULL;
> continue;
> }
> After that the sub-directories are visible after mounting and part1 is working.
> But after mounting when I do "ls -l" on vvfat mounted path, on any
> directory, vvfat_read() is not getting called.
>
> Somebody who knows about vvfat implementation please let me know where
> is the problem.
I doubt that this is possible. A guest OS doesn't expect that data on
the disk changes when it didn't write to it. So for example, it could
read in the whole FAT and never really look at the on-disk FAT any more.
In practice, probably only parts of the FAT are cached, but that doesn't
help you. You never know which parts are cached, and anyway, even if you
knew which parts you may change, restricting changes to these parts of
the FATs would be tricky... vvfat is already complicated enough without
doing anything like this.
Kevin
next prev parent reply other threads:[~2011-09-19 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 12:49 [Qemu-devel] Help needed -- vvfat.c Pintu Kumar
2011-09-19 14:37 ` Kevin Wolf [this message]
2011-09-23 10:30 ` Pintu Kumar
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=4E77538F.3060305@redhat.com \
--to=kwolf@redhat.com \
--cc=pintu.ping@gmail.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).