mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Synchronization between VFS and special IO requests to a block device.
@ 2006-01-18 11:00 Roopesh
  2006-01-19 14:57 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Roopesh @ 2006-01-18 11:00 UTC (permalink / raw)
  To: linux-kernel

  Hi,
  
	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?

  Mine is a 2.4 kernel with a uni-processor.

  Thanks in Advance,

  Roopesh.
  PS: Kindly mark a CC: to me if posting. Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Synchronization between VFS and special IO requests to a block device.
  2006-01-18 11:00 Synchronization between VFS and special IO requests to a block device Roopesh
@ 2006-01-19 14:57 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2006-01-19 14:57 UTC (permalink / raw)
  To: Roopesh; +Cc: linux-kernel

  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-19 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-18 11:00 Synchronization between VFS and special IO requests to a block device Roopesh
2006-01-19 14:57 ` Jan Kara

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®