From: "Belan Kumar" <belkumar@gmail.com>
To: "Andrew Morton" <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: VFS && UFS write support: possible on *BSD/Solaris, impossible on Linux?
Date: Wed, 19 Apr 2006 13:22:19 +0400 [thread overview]
Message-ID: <84a104fc0604190222k49e4ebbcn7b807743afcd9fc3@mail.gmail.com> (raw)
Hello.
May be better call subject something like: "Shortest way to ufs write support",
but current subject give more chances to recieve answer.
First of all I try explain the current problem:
UFS as other block file systems has notition of "block",
but further to "block" notion it has "fragment" concept.
"fragment" used for preventing waste of space.
Usually fragment==block/8, and if "the rest of file" doesn't occupy
the whole block, it occupy several fragments. If file grows, at some point
"the rest of file" will be occupy 8 fragments. And HERE IS PROBLEM,
we should allocate block and move 8 fragments to it.
On *BSD/Solaris it is simple: they read analog of buffer_head and
change analog of b_blocknr and that's all.
The current code of fs/ufs/balloc.c does the same:
----------------------
sb_bread
bh->b_blocknr =
mark_buffer_dirty (bh)
brelse (bh)
--------------------------
I suppose you guess: it doesn't work,
latter when you do sb_getblk(old_blocknr) it give to us the same block
and after that kernel hang up.
Hence question: what would be the proper solution in this situation?
Is it possible in current VFS change b_blocknr?
next reply other threads:[~2006-04-19 9:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-19 9:22 Belan Kumar [this message]
2006-04-21 12:30 ` Jan Kara
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=84a104fc0604190222k49e4ebbcn7b807743afcd9fc3@mail.gmail.com \
--to=belkumar@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®