lkml.org 
[lkml]   [2008]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] ext3 freeze feature
Date
On Friday 25 January 2008 05:33, Theodore Tso wrote:
> and then detect the
> deadlock case where the process holding the file descriptor used to
> freeze the filesystem gets frozen because it attempted to write to the
> filesystem --- at which point it gets some kind of signal (which
> defaults to killing the process), and the filesystem is unfrozen and
> as part of the unfreeze you wake up all of the processes that were put
> to sleep for touching the frozen filesystem.

Hi Ted,

There are a few holes:

* The process may try to handle the signal and end up blocking on
the filesystem again.

* The process might pass the fd to another process by forking or
fd passing.

* The process holding the fd might be trying to take a lock held
by another process that is blocked on the filesystem, and infinite
variations on that theme.

Remembering the task that did the ioctl might work out better than
remembering the fd. Or just not try to be so fancy and rely on the
application to take appropriate measures to ensure it will not access
the filesystem, such as memlocking and not execing.

The freezer also needs to run in PF_MEMALLOC mode or similar
unless it can be sure it will not cause pageout to the frozen filesystem
under low memory conditions.

Regards,

Daniel


\
 
 \ /
  Last update: 2008-01-31 09:55    [W:0.211 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site