Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
To: Ganzoo Awaasuren <ganaa.8.91-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: USB Write Checkpoint
Date: Wed, 2 Jun 2010 08:22:57 -0500	[thread overview]
Message-ID: <20100602132257.GA19349@hallyn.com> (raw)
In-Reply-To: <AANLkTikYoK7EIJ4AoAT83qDujVFeDhPoo08GbzEF07b6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Quoting Ganzoo Awaasuren (ganaa.8.91-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org):
> Dear All
> 
> Now I am changing and developing some kernel stuffs which is related to
> Linux FileSystems.
> 
> My work is just to find the solution for the inconvinence use of the USB
> disk. We have to click "safe remove" button for flush the buffer data to
> disk before the plug off the USB disk .

...

> As far as i understand from your developed checkpoint technique on linux
> kernel , probably i can get it and apply it for my purpose. So is it
> possible to call that sys_checkpoint function in kernel's sys_write system
> call ? if it is possible then , is this checkpointed image will include that
> all of the open files ?

Short answer is no.  We freezer the userspace tasks for the duration
of the checkpoint, but we are only guaranteeing consistency with respect
to the read/write syscalls (we currently even refuse checkpoint for
aio).  What happens in the kernel to effect a write is not doesn't
matter to us, it's assumed to complete.

I'd imagine you could catch the fact that a write occurs to a disconnected
device, start queueing up the data to be written, send an error message
up through to userspace, through dbus to an error dialog, and warn the user
to re-insert the device.  But application c/r work is not going to be
helpful here - unless an application is still actively writing, in which
case part of the userspace callbacks in response to the error message from
the kernel might be to do an lsof to find guilty tasks, and freeze them.

-serge

      parent reply	other threads:[~2010-06-02 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31 10:57 USB Write Checkpoint Ganzoo Awaasuren
     [not found] ` <AANLkTikYoK7EIJ4AoAT83qDujVFeDhPoo08GbzEF07b6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-02 13:22   ` Serge E. Hallyn [this message]

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=20100602132257.GA19349@hallyn.com \
    --to=serge-a9i7lubdfnhqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ganaa.8.91-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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