qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Help needed -- vvfat.c


From: Kevin Wolf
Subject: Re: [Qemu-devel] Help needed -- vvfat.c
Date: Mon, 19 Sep 2011 16:37:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]