[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] Locking a filesystem for reorganization
From:       Mathias_Panzenböck
Date:       2011-09-28 22:02:59
Message-ID: 4E839993.60501 () gmx ! net
[Download RAW message or body]

Instead of completely locking, could you make it read only?

On 09/28/2011 11:00 PM, Stefan Westerfeld wrote:
>     Hi!
>
> I'm writing a filesystem with fuse that should store content hashes combined
> with history as representation of the files. So normally you can write new
> files and the contents are just stored. But once you run an external program,
> like
>
> $ bfsync2 commit
>
> I need to transform the file contents into hashes and update the history. I
> don't want the fuse filesystem to interfere with the reorganization.
>
> My first approach was to let the external program (bfsync2) write a special
> file called .bfsync/lock to the FUSE filesystem and write its own pid into the
> lock file. Then I added code into every bfsync_open/bfsync_read/...  function
> to simply wait for the pid to terminate and block.
>
> However, I've seen that this often causes problems: for instance under KDE4 (if
> I understood this correctly), the terminal emulator konsole tries to magically
> tell the user the working directory of the running process. Since the FUSE
> filesystem is locked during bfsync2 commit, konsole blocks (since all bfsync
> filesystem operations block). Since konsole blocks, the terminal output of
> bfsync2 commit isn't read anymore, so the commit also blocks. Deadlock. Only
> killing the bfsync2 commit process helps.
>
> Any suggestions of how to do this properly?
>
>     Cu... Stefan


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic