mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Roopesh <roopesh@cyberspace.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Synchronization between VFS and special IO requests to a block device.
Date: Thu, 19 Jan 2006 15:57:51 +0100	[thread overview]
Message-ID: <20060119145751.GA10185@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20060118110022.GA32663@grex.cyberspace.org>

  Hello,

> 	I have an SD card, a partition of which is mounted and is accessed
>   only through VFS, and certain sectors out of this partition having
>   some special data which is accessed by the applications only through
>   certain ioctls to the device. 
>   
>   My problem is in synchronizing/serializing these two accesses to the
>   hardware, especially since I dont want a VFS request to be handled 
>   by the driver inbetween two specific ioctls.  I understand that the
> 	strategy routine should be atomic and that it cant wait on a lock or 
> 	sleep.  Any pointers/suggestions/help?
  If your areas are 4KB (size of pages) aligned and you really always
access either through VFS or though ioctl, then you need no
synchronization (VFS does not care about areas accessed through ioctl)
and ioctl does not care about areas accessed by VFS. Or you need to
somehow ensure that some space written by VFS is written before some
ioctl is called?

								Honza

-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

      reply	other threads:[~2006-01-19 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-18 11:00 Roopesh
2006-01-19 14:57 ` Jan Kara [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=20060119145751.GA10185@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roopesh@cyberspace.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

all inboxes | Powered by JetHome®