hi,
if the partition is raw, can i give 1 for blocknr to write on first block. and for b_dev and b_rdev can i give the same value by the macro
MKDEV(8,16) where 8 is the major and 16 is the minor. i have declared a structure (struct block_device_operations block_bdops;)
and not defined as i am not using any bdops. is this ok to pass the structure while rigestering the block device or i need to define it?
----- Original Message -----
From: "nitin ahuja"
To: ganesh_kmr@xxxxxxxx
Subject: Re: Re: need help on block device driver.
Date: Tue, 19 Apr 2005 06:01:52 -0600
>
> 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
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://www.mail.com/?sr=signup