public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christof <mail@pop2wap.net>
To: linux-kernel@vger.kernel.org
Subject: some ext2-understanding problems (page cache etc.)
Date: Fri, 30 Apr 2004 03:21:19 +0200	[thread overview]
Message-ID: <4091AA0F.8050700@pop2wap.net> (raw)

Hello,

I'm not a kernel guru, but my task is to extract some ext2-code from the 
kernel into user space for a scientific project/experiment. I've 
"ported" a lot of code by now but now I am stuck.
I wanted to bypass the page cache and disk buffer and have all writes 
and reads directly in memory. I don't want to get into details, but 
imagine I have an image of an ext2-filesystem in memory and want to 
access it in user space but with the same interface as it would be in 
the kernel.

My problem at the moment is the function ext2_make_empty.
It is called in ext2_mkdir after an inode has been created.
It looks like the ext2_make_empty creates the basic dir entries like "." 
and ".." but I cannot find the block number where this information is 
written on disk. There seems to be a function get_block but i'm not sure 
what it exactly does. Could you help me to understand how and when 
block-numbers are set?

I see 2 possibilities:
  1. The block numbers are set at the moment files/dirs are created,
     changed etc.
  2. First, pages are requested. When they need to be written, a block
     number is obtained (if needed).

Is any of these ideas true?
Once again: I need to replace all writes and reads to and from pages and 
buffers by writes and reads to block numbers on the given device.

Thanks in advance!

-- 
Q: What's little, yellow and very very dangerous?
A: A canary with the super-user password.


             reply	other threads:[~2004-04-30  1:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-30  1:21 Christof [this message]
2004-04-30 20:29 ` some ext2-understanding problems (page cache etc.) Theodore Ts'o

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=4091AA0F.8050700@pop2wap.net \
    --to=mail@pop2wap.net \
    --cc=linux-kernel@vger.kernel.org \
    /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