Re: Read/Write sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey paulo,

The Issue that you discussed is clearly related to barriers, which are
used extensively in the linux kernel at most of the places as one of
the synchronization primitive.
I would suggest you reading more on read/write barriers.
You found find good explanation on the same in Linux Kernel
development by Rovert Love.

HTH

On Sun, Jul 27, 2008 at 1:46 AM, Paulo da Silva <psdasilva@xxxxxxxxxxxx> wrote:
> Hi!
>
> I am learning linkux kernel internals and facing the following problem:
>
> 1. I use __bread to read a fixed place block on a block drive.
> 2. I use submit_bio to read/write data on the same drive.  The order the
> data is written may be arbitrary and, in general, it almost never occur at
> the same block address.
> 3. Then I need to (re)write the block from point 1. but forcing all data
> from point 2. being written first and all subsequent data written after it
> using submit_bio must occur after the block is on disk.
>
> __bread BLOCK; several submit_bio; WRITE BLOCK (barrier here); several
> submit_bio
>
> How do I do this, I mean WRITE BLOCK?
>
> Thanks for any help.
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Regards,
Sandeep.






"To learn is to change. Education is a process that changes the learner."

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux