Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77930
b: refs/heads/master
c: 5c98fc0
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and Sam Ravnborg committed Jan 28, 2008
1 parent b30ed98 commit c887379
Show file tree
Hide file tree
Showing 54 changed files with 865 additions and 7,774 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03bc26cfefd6db756e6bc7fcda11dc17ada7be16
refs/heads/master: 5c98fc0360437327e4034ecfe8b818ad82622100
20 changes: 1 addition & 19 deletions trunk/Documentation/filesystems/ext4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,9 @@ Alex is working on a new set of patches right now.
When mounting an ext4 filesystem, the following option are accepted:
(*) == default

extents (*) ext4 will use extents to address file data. The
extents ext4 will use extents to address file data. The
file system will no longer be mountable by ext3.

noextents ext4 will not use extents for newly created files

journal_checksum Enable checksumming of the journal transactions.
This will allow the recovery code in e2fsck and the
kernel to detect corruption in the kernel. It is a
compatible change and will be ignored by older kernels.

journal_async_commit Commit block can be written to disk without waiting
for descriptor blocks. If enabled older kernels cannot
mount the device. This will enable 'journal_checksum'
internally.

journal=update Update the ext4 file system's journal to the current
format.

Expand Down Expand Up @@ -208,12 +196,6 @@ nobh (a) cache disk block mapping information
"nobh" option tries to avoid associating buffer
heads (supported only for "writeback" mode).

mballoc (*) Use the multiple block allocator for block allocation
nomballoc disabled multiple block allocator for block allocation.
stripe=n Number of filesystem blocks that mballoc will try
to use for allocation size and alignment. For RAID5/6
systems this should be the number of data
disks * RAID chunk size in file system blocks.

Data Mode
---------
Expand Down
39 changes: 0 additions & 39 deletions trunk/Documentation/filesystems/proc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -857,45 +857,6 @@ CPUs.
The "procs_blocked" line gives the number of processes currently blocked,
waiting for I/O to complete.

1.9 Ext4 file system parameters
------------------------------
Ext4 file system have one directory per partition under /proc/fs/ext4/
# ls /proc/fs/ext4/hdc/
group_prealloc max_to_scan mb_groups mb_history min_to_scan order2_req
stats stream_req

mb_groups:
This file gives the details of mutiblock allocator buddy cache of free blocks

mb_history:
Multiblock allocation history.

stats:
This file indicate whether the multiblock allocator should start collecting
statistics. The statistics are shown during unmount

group_prealloc:
The multiblock allocator normalize the block allocation request to
group_prealloc filesystem blocks if we don't have strip value set.
The stripe value can be specified at mount time or during mke2fs.

max_to_scan:
How long multiblock allocator can look for a best extent (in found extents)

min_to_scan:
How long multiblock allocator must look for a best extent

order2_req:
Multiblock allocator use 2^N search using buddies only for requests greater
than or equal to order2_req. The request size is specfied in file system
blocks. A value of 2 indicate only if the requests are greater than or equal
to 4 blocks.

stream_req:
Files smaller than stream_req are served by the stream allocator, whose
purpose is to pack requests as close each to other as possible to
produce smooth I/O traffic. Avalue of 16 indicate that file smaller than 16
filesystem block size will use group based preallocation.

------------------------------------------------------------------------------
Summary
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ config JBD_DEBUG

config JBD2
tristate
select CRC32
help
This is a generic journaling layer for block devices that support
both 32-bit and 64-bit block numbers. It is currently used by
Expand Down
9 changes: 4 additions & 5 deletions trunk/fs/afs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,11 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
dentry->d_op = &afs_fs_dentry_operations;

d_add(dentry, inode);
_leave(" = 0 { vn=%u u=%u } -> { ino=%lu v=%llu }",
_leave(" = 0 { vn=%u u=%u } -> { ino=%lu v=%lu }",
fid.vnode,
fid.unique,
dentry->d_inode->i_ino,
(unsigned long long)dentry->d_inode->i_version);
dentry->d_inode->i_version);

return NULL;
}
Expand Down Expand Up @@ -630,10 +630,9 @@ static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
* been deleted and replaced, and the original vnode ID has
* been reused */
if (fid.unique != vnode->fid.unique) {
_debug("%s: file deleted (uq %u -> %u I:%llu)",
_debug("%s: file deleted (uq %u -> %u I:%lu)",
dentry->d_name.name, fid.unique,
vnode->fid.unique,
(unsigned long long)dentry->d_inode->i_version);
vnode->fid.unique, dentry->d_inode->i_version);
spin_lock(&vnode->lock);
set_bit(AFS_VNODE_DELETED, &vnode->flags);
spin_unlock(&vnode->lock);
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/afs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ int afs_getattr(struct vfsmount *mnt, struct dentry *dentry,

inode = dentry->d_inode;

_enter("{ ino=%lu v=%llu }", inode->i_ino,
(unsigned long long)inode->i_version);
_enter("{ ino=%lu v=%lu }", inode->i_ino, inode->i_version);

generic_fillattr(inode, stat);
return 0;
Expand Down
44 changes: 0 additions & 44 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3213,50 +3213,6 @@ static int buffer_cpu_notify(struct notifier_block *self,
return NOTIFY_OK;
}

/**
* bh_uptodate_or_lock: Test whether the buffer is uptodate
* @bh: struct buffer_head
*
* Return true if the buffer is up-to-date and false,
* with the buffer locked, if not.
*/
int bh_uptodate_or_lock(struct buffer_head *bh)
{
if (!buffer_uptodate(bh)) {
lock_buffer(bh);
if (!buffer_uptodate(bh))
return 0;
unlock_buffer(bh);
}
return 1;
}
EXPORT_SYMBOL(bh_uptodate_or_lock);

/**
* bh_submit_read: Submit a locked buffer for reading
* @bh: struct buffer_head
*
* Returns zero on success and -EIO on error.
*/
int bh_submit_read(struct buffer_head *bh)
{
BUG_ON(!buffer_locked(bh));

if (buffer_uptodate(bh)) {
unlock_buffer(bh);
return 0;
}

get_bh(bh);
bh->b_end_io = end_buffer_read_sync;
submit_bh(READ, bh);
wait_on_buffer(bh);
if (buffer_uptodate(bh))
return 0;
return -EIO;
}
EXPORT_SYMBOL(bh_submit_read);

void __init buffer_init(void)
{
int nrpages;
Expand Down
32 changes: 4 additions & 28 deletions trunk/fs/ext2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,42 +680,18 @@ static int ext2_check_descriptors (struct super_block * sb)
static loff_t ext2_max_size(int bits)
{
loff_t res = EXT2_NDIR_BLOCKS;
int meta_blocks;
loff_t upper_limit;

/* This is calculated to be the largest file size for a
* dense, file such that the total number of
/* This constant is calculated to be the largest file size for a
* dense, 4k-blocksize file such that the total number of
* sectors in the file, including data and all indirect blocks,
* does not exceed 2^32 -1
* __u32 i_blocks representing the total number of
* 512 bytes blocks of the file
*/
upper_limit = (1LL << 32) - 1;

/* total blocks in file system block size */
upper_limit >>= (bits - 9);


/* indirect blocks */
meta_blocks = 1;
/* double indirect blocks */
meta_blocks += 1 + (1LL << (bits-2));
/* tripple indirect blocks */
meta_blocks += 1 + (1LL << (bits-2)) + (1LL << (2*(bits-2)));

upper_limit -= meta_blocks;
upper_limit <<= bits;
* does not exceed 2^32. */
const loff_t upper_limit = 0x1ff7fffd000LL;

res += 1LL << (bits-2);
res += 1LL << (2*(bits-2));
res += 1LL << (3*(bits-2));
res <<= bits;
if (res > upper_limit)
res = upper_limit;

if (res > MAX_LFS_FILESIZE)
res = MAX_LFS_FILESIZE;

return res;
}

Expand Down
32 changes: 4 additions & 28 deletions trunk/fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,42 +1436,18 @@ static void ext3_orphan_cleanup (struct super_block * sb,
static loff_t ext3_max_size(int bits)
{
loff_t res = EXT3_NDIR_BLOCKS;
int meta_blocks;
loff_t upper_limit;

/* This is calculated to be the largest file size for a
* dense, file such that the total number of
/* This constant is calculated to be the largest file size for a
* dense, 4k-blocksize file such that the total number of
* sectors in the file, including data and all indirect blocks,
* does not exceed 2^32 -1
* __u32 i_blocks representing the total number of
* 512 bytes blocks of the file
*/
upper_limit = (1LL << 32) - 1;

/* total blocks in file system block size */
upper_limit >>= (bits - 9);


/* indirect blocks */
meta_blocks = 1;
/* double indirect blocks */
meta_blocks += 1 + (1LL << (bits-2));
/* tripple indirect blocks */
meta_blocks += 1 + (1LL << (bits-2)) + (1LL << (2*(bits-2)));

upper_limit -= meta_blocks;
upper_limit <<= bits;
* does not exceed 2^32. */
const loff_t upper_limit = 0x1ff7fffd000LL;

res += 1LL << (bits-2);
res += 1LL << (2*(bits-2));
res += 1LL << (3*(bits-2));
res <<= bits;
if (res > upper_limit)
res = upper_limit;

if (res > MAX_LFS_FILESIZE)
res = MAX_LFS_FILESIZE;

return res;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ext4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ obj-$(CONFIG_EXT4DEV_FS) += ext4dev.o

ext4dev-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
ext4_jbd2.o migrate.o mballoc.o
ext4_jbd2.o

ext4dev-$(CONFIG_EXT4DEV_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
ext4dev-$(CONFIG_EXT4DEV_FS_POSIX_ACL) += acl.o
Expand Down
Loading

0 comments on commit c887379

Please sign in to comment.