Re: Re: need help on block device driver.

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

 



Hi,

>
> is there any specific reason for using 
> sync_dirty_buffer. 
> Can you tell me how to calculate the blocknr and 
> rsector
>

"sync_dirty_buffer()" inturn uses "generic_make_request()", so it would just make your job easier.

blocknr = bh->b_blocknr and 
rsector = bh->b_blocknr * (bh->b_size >> 9)

where "bh" is your buffer head pointer.

niTin


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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