Andrew writes:
> Andreas Dilger wrote:
> > I still don't agree. If they are contiguous in the file (even if
> > we have 32 filesystem blocks in a page, then we are still only
> > dirtying a limited number of indirect blocks (5). Yes, we can dirty
> > up to 32 block bitmaps, 32 group descriptors, and 32 data blocks. If
> > you take the fact that we need to allocate indirect blocks into account,
> > it would be 3(N+5) + 2 + 2*EXT3_SINGLEDATATRANS_BLOCKS, so 129 for a 1k
> > block filesystem and 32k pages. Only 33 for 4k blocks and 4k pages.
>
> You are correct. But I don't quite understand the math.
>
> With N = #blocks-per-page, a single page write can
> dirty:
>
> N data blocks
> 2 indirect blocks
> 2 dindirect
> 1 tindirect
That is N+5,
> N+5 bitmap blocks (for the above)
> N+5 group descriptor summary blocks
another 2(N+5),
> 1 inode block
> 1 superblock.
and 2, so this is my 3(N+5) +2. What you are missing is the updates to
the quota file(s).
> With ordered or writeback data it's the same, less the N data
> blocks.
It may be worthwhile in this case to reduce the reservation count for
ordered or writeback mode, so that we put less pressure on flushing
the journal needlessly.
> > Actually, I was just starting to ask on the reiserfs list about their
> > BH_* flags that they use. Kind of a bad situation - they define BH_*
> > flags in reiserfs_fs_sb.h rather than in fs.h. This means the bits
> > could be re-used elsewhere and cause a lot of grief/bugs. I've asked
> > them to move all of the bits to fs.h:
>
> Well... I think it's sensible to define "core" BH_ bits and
> leave the fs-specific ones up to the fs. buffer_heads are
> already being put back onto the freelist in various junky states,
> but (some of) the fields are initialised as people start to
> recycle them. Given that getblk() and create_buffers() both
> set ->b_state to a known, sane value I don't think ext3 will
> be affected no matter what state b_state is in when reiserfs
> frees it.
>
> So I'm in fact inclined to move much of the ext3/jfs changes
> *out* of fs.h and into ext3_fs.h and jfs.h. There's a lot
> of that sort of thing needs doing - splitting apart, tidying
> up, honouring the config options, etc. Straightforward stuff -
> leave that till things are more stable.
I guess it depends on what the goal is. Since the JFS code is right
inside the buffer layer, we definitely don't want to have conflicting
BH_* bits with the reiserfs code. I have worked up some patches to
move the reiserfs BH_* bits into fs.h, so that at least the rest of
the world knows about it. The other solution is to declare certain
bits "fs private" to avoid reusing them. It gets messy however...
> I haven't tested recovery explicitly, although I've been
> checking it whenever I crash the fs (often). The only
> problems observed so far after recovery are that occasionally
> the group descriptor summaries claim that there are too few
> free inodes and blocks. Missing a group descriptor block
> somewhere in truncate probably. Also, some deleted inodes are
> coming up with zero dtime. Apart from that - solid.
The other alternative is that the group descriptor updates are
correct, and your inode updates are not...
> Question: It may be useful to prevent simultaneous commits
> against different partitions on the same disk. How does one
> determine this, given an in-core superblock? Presumably,
> comparing majors isn't enough.
Probably not worth the effort (breaks separation between filesystems),
and in the end with meta devices it is really hard to determine this.
Meta devices will all have the same major, but may be many-to-one or
one-to-many for volume-to-disk mappings.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]