mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas Berry" <nikberry@med.umich.edu>
To: <root@chaos.analogic.com>, <sanju93csd@yahoo.co.in>
Cc: <Matt_Domsch@dell.com>, <linux-kernel@vger.kernel.org>
Subject: Re: How to get the size of the block device ???? (Important)
Date: Tue, 17 Dec 2002 09:39:04 -0500	[thread overview]
Message-ID: <sdfef0cc.007@mail-02.med.umich.edu> (raw)

I think the question being asked is 'how do I find out how many block
long the device is?'

You can open it, seek to the end, then the file postiton will tell you
the size of the device.

Nik


>>> "Richard B. Johnson" <root@chaos.analogic.com> 12/17/02 09:36AM
>>>
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.
> 
> 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.


             reply	other threads:[~2002-12-17 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-17 14:39 Nicholas Berry [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-17 18:49 Matt_Domsch
2002-12-17 14:22 Sanjay Kumar
2002-12-17 14:36 ` Richard B. Johnson
2002-12-17 14:40   ` Sean Neakums

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sdfef0cc.007@mail-02.med.umich.edu \
    --to=nikberry@med.umich.edu \
    --cc=Matt_Domsch@dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    --cc=sanju93csd@yahoo.co.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®