lkml.org 
[lkml]   [2006]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectVFS && UFS write support: possible on *BSD/Solaris, impossible on Linux?
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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-19 11:24    [W:0.054 / U:26.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site