Wait for an IO to complete

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

 



Hi All,

I want to wait in my code till the IO actually goes to the disk.

For example

struct buffer_head *bh=sb_bread(sb, 20)

strcpy(bh->b_data, "Some Data");

/* mark and sync */
mark_buffer_dirty(bh);
sync_dirty_buffer(bh);

The above code only adds the bh to the request queue and returns.

I need something

write_buffer_to_disk(bh)

Which will return only if the data has been written on disk.

Please help
--

Regards,
Rishi Agrawal
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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