How to get the size of the block device ???? (Important)
Hi,
I am Sanjay Kumar and wants to write my own file
system on Linux. I have almost written the code.
But,now i have a problem while writing the code
for "mkfs" for my filesystem.
Problem Summary : I need the size of the block device in bytes on which my file system will be created. Actually, there is a feild in the super block, needs the total no of blocks on the device while while creating the filesystem. So, Can you Plz. help me out of this problem.
I got your email id from :
http://lwn.net/2001/0906/a/last-sector.php3
Sanjay Kumar.
M.C.A.,
Univeristy of Pune,
India.
________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
visit http://in.tv.yahoo.com
Quoted 6 lines · On Tue, 17 Dec 2002, [iso-8859-1] Sanjay Kumar wrote:
Hi,
I am Sanjay Kumar and wants to write my own file
system on Linux. I have almost written the code.
But,now i have a problem while writing the code
for "mkfs" for my filesystem.
Quoted 7 lines
Problem Summary : I need the size of the block device in bytes on which my file system will be created. Actually, there is a feild in the super block, needs the total no of blocks on the device while while creating the filesystem. So, Can you Plz. help me out of this problem.
You make an ioctl() function for your file-system that returns the block-size that you selected when you designed the system.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it.
commence Richard B. Johnson quotation:
Quoted 10 lines · On Tue, 17 Dec 2002, [iso-8859-1] Sanjay Kumar wrote:
Quoted 6 lines
Problem Summary : I need the size of the block device in bytes on which my file system will be created. Actually, there is a feild in the super block, needs the total no of blocks on the device while while creating the filesystem. So, Can you Plz. help me out of this problem.
You make an
ioctl()function for your file-system that returns the block-size that you selected when you designed the system.
The size of the block device is what is sought here, not the block size of the filesystem.
Isn't there an ioctl for this? BLKSIZEGET or something?
Signature · 4 lines
/ | [|] Sean Neakums | Questions are a burden to others; [|] <[email protected]> | answers a prison for oneself. \ |