#
aebf0243 |
| 12-Jan-2013 |
Wang Shilong <wangsl-fnst@cn.fujitsu.com> |
ext4: use unlikely to improve the efficiency of the kernel
Because the function 'sb_getblk' seldomly fails to return NULL value,it will be better to use 'unlikely' to optimize it.
Signed-off-by: Wa
ext4: use unlikely to improve the efficiency of the kernel
Because the function 'sb_getblk' seldomly fails to return NULL value,it will be better to use 'unlikely' to optimize it.
Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
860d21e2 |
| 12-Jan-2013 |
Theodore Ts'o <tytso@mit.edu> |
ext4: return ENOMEM if sb_getblk() fails
The only reason for sb_getblk() failing is if it can't allocate the buffer_head. So ENOMEM is more appropriate than EIO. In addition, make sure that the fi
ext4: return ENOMEM if sb_getblk() fails
The only reason for sb_getblk() failing is if it can't allocate the buffer_head. So ENOMEM is more appropriate than EIO. In addition, make sure that the file system is marked as being inconsistent if sb_getblk() fails.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@vger.kernel.org
show more ...
|
Revision tags: v3.8-rc3, v3.8-rc2, v3.8-rc1, v3.7, v3.7-rc8, v3.7-rc7, v3.7-rc6, v3.7-rc5 |
|
#
37be2f59 |
| 08-Nov-2012 |
Eric Sandeen <sandeen@redhat.com> |
ext4: remove ext4_handle_release_buffer()
ext4_handle_release_buffer() was intended to remove journal write access from a buffer, but it doesn't actually do anything at all other than add a BUFFER_T
ext4: remove ext4_handle_release_buffer()
ext4_handle_release_buffer() was intended to remove journal write access from a buffer, but it doesn't actually do anything at all other than add a BUFFER_TRACE point, but it's not reliably used for that either. Remove all the associated dead code.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
show more ...
|
Revision tags: v3.7-rc4, v3.7-rc3 |
|
#
79f1ba49 |
| 21-Oct-2012 |
Tao Ma <boyu.mt@taobao.com> |
ext4: Checksum the block bitmap properly with bigalloc enabled
In mke2fs, we only checksum the whole bitmap block and it is right. While in the kernel, we use EXT4_BLOCKS_PER_GROUP to indicate the s
ext4: Checksum the block bitmap properly with bigalloc enabled
In mke2fs, we only checksum the whole bitmap block and it is right. While in the kernel, we use EXT4_BLOCKS_PER_GROUP to indicate the size of the checksumed bitmap which is wrong when we enable bigalloc. The right size should be EXT4_CLUSTERS_PER_GROUP and this patch fixes it.
Also as every caller of ext4_block_bitmap_csum_set and ext4_block_bitmap_csum_verify pass in EXT4_BLOCKS_PER_GROUP(sb)/8, we'd better removes this parameter and sets it in the function itself.
Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Lukas Czerner <lczerner@redhat.com> Cc: stable@vger.kernel.org
show more ...
|
Revision tags: v3.7-rc2, v3.7-rc1, v3.6 |
|
#
0acdb887 |
| 25-Sep-2012 |
Tao Ma <boyu.mt@taobao.com> |
ext4: don't call update_backups() multiple times for the same bg
When performing an online resize, we add a bunch of groups at one time in ext4_flex_group_add, so in most cases a lot of group descri
ext4: don't call update_backups() multiple times for the same bg
When performing an online resize, we add a bunch of groups at one time in ext4_flex_group_add, so in most cases a lot of group descriptors will be in the same group block. But in the end of this function, update_backups will be called for every group descriptor and the same block will be copied and journalled again and again. It is really a waste.
Fix things so we only update a particular bg descriptor block once and skip subsequent updates of the same block.
Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
7f1468d1 |
| 25-Sep-2012 |
Dmitry Monakhov <dmonakhov@openvz.org> |
ext4: fix double unlock buffer mess during fs-resize
bh_submit_read() is responsible for unlock bh on endio. In addition, we need to use bh_uptodate_or_lock() to avoid races.
Signed-off-by: Dmitry
ext4: fix double unlock buffer mess during fs-resize
bh_submit_read() is responsible for unlock bh on endio. In addition, we need to use bh_uptodate_or_lock() to avoid races.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
Revision tags: v3.6-rc7 |
|
#
bef53b01 |
| 20-Sep-2012 |
Tao Ma <boyu.mt@taobao.com> |
ext4: remove erroneous ext4_superblock_csum_set() in update_backups()
The update_backups() function is used to backup all the metadata blocks, so we should not take it for granted that 'data' is poi
ext4: remove erroneous ext4_superblock_csum_set() in update_backups()
The update_backups() function is used to backup all the metadata blocks, so we should not take it for granted that 'data' is pointed to a super block and use ext4_superblock_csum_set to calculate the checksum there. In case where the data is a group descriptor block, it will corrupt the last group descriptor, and then e2fsck will complain about it it.
As all the metadata checksums should already be OK when we do the backup, remove the wrong ext4_superblock_csum_set and it should be just fine.
Reported-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@vger.kernel.org
show more ...
|
#
59e31c15 |
| 18-Sep-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: fix online resizing when the # of block groups is constant
Commit 1c6bd7173d66b3 introduced a regression where an online resize operation which did not change the number of block groups would
ext4: fix online resizing when the # of block groups is constant
Commit 1c6bd7173d66b3 introduced a regression where an online resize operation which did not change the number of block groups would fail, i.e:
mke2fs -t /dev/vdc 60000 mount /dev/vdc resize2fs /dev/vdc 60001
This was due to a bug in the logic regarding when to try converting the filesystem to use meta_bg.
Also fix up a number of other minor issues with the online resizing code: (a) Fix a sparse warning; (b) only check to make sure the device is large enough once, instead of multiple times through the resize loop.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
Revision tags: v3.6-rc6 |
|
#
4da4a56e |
| 13-Sep-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: log a resize update to the console every 10 seconds
For very long online resizes, a periodic update to the console log is helpful for debugging and for progress reporting.
Signed-off-by: "The
ext4: log a resize update to the console every 10 seconds
For very long online resizes, a periodic update to the console log is helpful for debugging and for progress reporting.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
1c6bd717 |
| 13-Sep-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: convert file system to meta_bg if needed during resizing
If we have run out of reserved gdt blocks, then clear the resize_inode feature and enable the meta_bg feature, so that we can continue
ext4: convert file system to meta_bg if needed during resizing
If we have run out of reserved gdt blocks, then clear the resize_inode feature and enable the meta_bg feature, so that we can continue resizing the file system seamlessly.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
93f90526 |
| 12-Sep-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: set bg_itable_unused when resizing
Set bg_itable_unused for file systems that have uninit_bg enabled. This will speed up the first e2fsck run after the file system is resized.
Signed-off-by:
ext4: set bg_itable_unused when resizing
Set bg_itable_unused for file systems that have uninit_bg enabled. This will speed up the first e2fsck run after the file system is resized.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
Revision tags: v3.6-rc5 |
|
#
01f795f9 |
| 05-Sep-2012 |
Yongqiang Yang <xiaoqiangnk@gmail.com> |
ext4: add online resizing support for meta_bg and 64-bit file systems
This patch adds support for resizing file systems with the meta_bg and 64bit features.
[ Added a fix by tytso to fix a divide b
ext4: add online resizing support for meta_bg and 64-bit file systems
This patch adds support for resizing file systems with the meta_bg and 64bit features.
[ Added a fix by tytso to fix a divide by zero when resizing a filesystem from 14 TB to 18TB. Also fixed overhead accounting for meta_bg file systems.]
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
28623c2f |
| 05-Sep-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: grow the s_group_info array as needed
Previously we allocated the s_group_info array with enough space for any future possible growth of the file system via online resize. This is unfortunate
ext4: grow the s_group_info array as needed
Previously we allocated the s_group_info array with enough space for any future possible growth of the file system via online resize. This is unfortunate because it wastes memory, and it doesn't work for the meta_bg scheme, since there is no limit based on the number of reserved gdt blocks. So add the code to grow the s_group_info array as needed.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
117fff10 |
| 05-Sep-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: grow the s_flex_groups array as needed when resizing
Previously, we allocated the s_flex_groups array to the maximum size that the file system could be resized. There was two problems with th
ext4: grow the s_flex_groups array as needed when resizing
Previously, we allocated the s_flex_groups array to the maximum size that the file system could be resized. There was two problems with this approach. First, it wasted memory in the common case where the file system was not resized. Secondly, once we start allowing online resizing using the meta_bg scheme, there is no maximum size that the file system can be resized. So instead, we need to grow the s_flex_groups at inline resize time.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
2ebd1704 |
| 05-Sep-2012 |
Yongqiang Yang <xiaoqiangnk@gmail.com> |
ext4: avoid duplicate writes of the backup bg descriptor blocks
The resize code was needlessly writing the backup block group descriptor blocks multiple times (once per block group) during an online
ext4: avoid duplicate writes of the backup bg descriptor blocks
The resize code was needlessly writing the backup block group descriptor blocks multiple times (once per block group) during an online resize.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@vger.kernel.org
show more ...
|
#
6df935ad |
| 05-Sep-2012 |
Yongqiang Yang <xiaoqiangnk@gmail.com> |
ext4: don't copy non-existent gdt blocks when resizing
The resize code was copying blocks at the beginning of each block group in order to copy the superblock and block group descriptor table (gdt)
ext4: don't copy non-existent gdt blocks when resizing
The resize code was copying blocks at the beginning of each block group in order to copy the superblock and block group descriptor table (gdt) blocks. This was, unfortunately, being done even for block groups that did not have super blocks or gdt blocks. This is a complete waste of perfectly good I/O bandwidth, to skip writing those blocks for sparse bg's.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@vger.kernel.org
show more ...
|
#
d7574ad0 |
| 05-Sep-2012 |
Yongqiang Yang <xiaoqiangnk@gmail.com> |
ext4: report the original old blocks count in a debug message when resizing
Avoid changing o_blocks_count, since it is used later when reporting old blocks count in debug mode.
Signed-off-by: Yongq
ext4: report the original old blocks count in a debug message when resizing
Avoid changing o_blocks_count, since it is used later when reporting old blocks count in debug mode.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
03c1c290 |
| 05-Sep-2012 |
Yongqiang Yang <xiaoqiangnk@gmail.com> |
ext4: ignore last group w/o enough space when resizing instead of BUG'ing
If the last group does not have enough space for group tables, ignore it instead of calling BUG_ON().
Reported-by: Daniel D
ext4: ignore last group w/o enough space when resizing instead of BUG'ing
If the last group does not have enough space for group tables, ignore it instead of calling BUG_ON().
Reported-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@vger.kernel.org
show more ...
|
Revision tags: v3.6-rc4, v3.6-rc3, v3.6-rc2, v3.6-rc1 |
|
#
b50924c2 |
| 22-Jul-2012 |
Artem Bityutskiy <artem.bityutskiy@linux.intel.com> |
ext4: remove unnecessary argument from __ext4_handle_dirty_metadata()
The '__ext4_handle_dirty_metadata()' does not need the 'now' argument anymore and we can kill it.
Signed-off-by: Artem Bityutsk
ext4: remove unnecessary argument from __ext4_handle_dirty_metadata()
The '__ext4_handle_dirty_metadata()' does not need the 'now' argument anymore and we can kill it.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
show more ...
|
#
8a991849 |
| 22-Jul-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: remove unused variable in ext4_update_super()
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
Revision tags: v3.5, v3.5-rc7 |
|
#
952fc18e |
| 09-Jul-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: fix overhead calculation used by ext4_statfs()
Commit f975d6bcc7a introduced bug which caused ext4_statfs() to miscalculate the number of file system overhead blocks. This causes the f_blocks
ext4: fix overhead calculation used by ext4_statfs()
Commit f975d6bcc7a introduced bug which caused ext4_statfs() to miscalculate the number of file system overhead blocks. This causes the f_blocks field in the statfs structure to be larger than it should be. This would in turn cause the "df" output to show the number of data blocks in the file system and the number of data blocks used to be larger than they should be.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
show more ...
|
Revision tags: v3.5-rc6, v3.5-rc5, v3.5-rc4, v3.5-rc3, v3.5-rc2, v3.5-rc1 |
|
#
2716b802 |
| 28-May-2012 |
Theodore Ts'o <tytso@mit.edu> |
ext4: remove redundundant "(char *) bh->b_data" casts
The b_data field of the buffer_head is already a char *, so there's no point casting it to a char *.
Signed-off-by: "Theodore Ts'o" <tytso@mit.
ext4: remove redundundant "(char *) bh->b_data" casts
The b_data field of the buffer_head is already a char *, so there's no point casting it to a char *.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
967ac8af |
| 28-May-2012 |
Haogang Chen <haogangchen@gmail.com> |
ext4: fix potential integer overflow in alloc_flex_gd()
In alloc_flex_gd(), when flexbg_size is large, kmalloc size would overflow and flex_gd->groups would point to a buffer smaller than expected,
ext4: fix potential integer overflow in alloc_flex_gd()
In alloc_flex_gd(), when flexbg_size is large, kmalloc size would overflow and flex_gd->groups would point to a buffer smaller than expected, causing OOB accesses when it is used.
Note that in ext4_resize_fs(), flexbg_size is calculated using sbi->s_log_groups_per_flex, which is read from the disk and only bounded to [1, 31]. The patch returns NULL for too large flexbg_size.
Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Haogang Chen <haogangchen@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
show more ...
|
Revision tags: v3.4, v3.4-rc7, v3.4-rc6 |
|
#
feb0ab32 |
| 29-Apr-2012 |
Darrick J. Wong <djwong@us.ibm.com> |
ext4: make block group checksums use metadata_csum algorithm
metadata_csum supersedes uninit_bg. Convert the ROCOMPAT uninit_bg flag check to a helper function that covers both, and make the checks
ext4: make block group checksums use metadata_csum algorithm
metadata_csum supersedes uninit_bg. Convert the ROCOMPAT uninit_bg flag check to a helper function that covers both, and make the checksum calculation algorithm use either crc16 or the metadata_csum chosen algorithm depending on which flag is set. Print a warning if we try to mount a filesystem with both feature flags set.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|
#
fa77dcfa |
| 29-Apr-2012 |
Darrick J. Wong <djwong@us.ibm.com> |
ext4: calculate and verify block bitmap checksum
Compute and verify the checksum of the block bitmap; this checksum is stored in the block group descriptor.
Signed-off-by: Darrick J. Wong <djwong@u
ext4: calculate and verify block bitmap checksum
Compute and verify the checksum of the block bitmap; this checksum is stored in the block group descriptor.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
show more ...
|