Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'fs_for_v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull reiserfs updates from Jan Kara:
"The biggest change in this pull is the addition of a deprecation
message about reiserfs with the outlook that we'd eventually be able
to remove it from the kernel. Because it is practically unmaintained
and untested and odd enough that people don't want to bother with it
anymore...

Otherwise there are small udf and ext2 fixes"

* tag 'fs_for_v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
udf: remove redundant assignment of variable etype
reiserfs: Deprecate reiserfs
ext2: correct max file size computing
reiserfs: get rid of AOP_FLAG_CONT_EXPAND flag

+20 -17
+5 -1
fs/ext2/super.c
··· 753 753 res += 1LL << (bits-2); 754 754 res += 1LL << (2*(bits-2)); 755 755 res += 1LL << (3*(bits-2)); 756 + /* Compute how many metadata blocks are needed */ 757 + meta_blocks = 1; 758 + meta_blocks += 1 + ppb; 759 + meta_blocks += 1 + ppb + ppb * ppb; 756 760 /* Does block tree limit file size? */ 757 - if (res < upper_limit) 761 + if (res + meta_blocks <= upper_limit) 758 762 goto check_lfs; 759 763 760 764 res = upper_limit;
+7 -3
fs/reiserfs/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 config REISERFS_FS 3 - tristate "Reiserfs support" 3 + tristate "Reiserfs support (deprecated)" 4 4 select CRC32 5 5 help 6 - Stores not just filenames but the files themselves in a balanced 7 - tree. Uses journalling. 6 + Reiserfs is deprecated and scheduled to be removed from the kernel 7 + in 2025. If you are still using it, please migrate to another 8 + filesystem or tell us your usecase for reiserfs. 9 + 10 + Reiserfs stores not just filenames but the files themselves in a 11 + balanced tree. Uses journalling. 8 12 9 13 Balanced trees are more efficient than traditional file system 10 14 architectural foundations.
+5 -11
fs/reiserfs/inode.c
··· 2763 2763 int old_ref = 0; 2764 2764 2765 2765 inode = mapping->host; 2766 - *fsdata = NULL; 2767 - if (flags & AOP_FLAG_CONT_EXPAND && 2768 - (pos & (inode->i_sb->s_blocksize - 1)) == 0) { 2769 - pos ++; 2770 - *fsdata = (void *)(unsigned long)flags; 2771 - } 2772 - 2773 2766 index = pos >> PAGE_SHIFT; 2774 2767 page = grab_cache_page_write_begin(mapping, index, flags); 2775 2768 if (!page) ··· 2888 2895 struct reiserfs_transaction_handle *th; 2889 2896 unsigned start; 2890 2897 bool locked = false; 2891 - 2892 - if ((unsigned long)fsdata & AOP_FLAG_CONT_EXPAND) 2893 - pos ++; 2894 2898 2895 2899 reiserfs_wait_on_write_block(inode->i_sb); 2896 2900 if (reiserfs_transaction_running(inode->i_sb)) ··· 3306 3316 3307 3317 /* fill in hole pointers in the expanding truncate case. */ 3308 3318 if (attr->ia_size > inode->i_size) { 3309 - error = generic_cont_expand_simple(inode, attr->ia_size); 3319 + loff_t pos = attr->ia_size; 3320 + 3321 + if ((pos & (inode->i_sb->s_blocksize - 1)) == 0) 3322 + pos++; 3323 + error = generic_cont_expand_simple(inode, pos); 3310 3324 if (REISERFS_I(inode)->i_prealloc_count > 0) { 3311 3325 int err; 3312 3326 struct reiserfs_transaction_handle th;
+2
fs/reiserfs/super.c
··· 1652 1652 return 1; 1653 1653 } 1654 1654 1655 + reiserfs_warning(NULL, "", "reiserfs filesystem is deprecated and " 1656 + "scheduled to be removed from the kernel in 2025"); 1655 1657 SB_BUFFER_WITH_SB(s) = bh; 1656 1658 SB_DISK_SUPER_BLOCK(s) = rs; 1657 1659
+1 -2
fs/udf/super.c
··· 2474 2474 unsigned int accum = 0; 2475 2475 uint32_t elen; 2476 2476 struct kernel_lb_addr eloc; 2477 - int8_t etype; 2478 2477 struct extent_position epos; 2479 2478 2480 2479 mutex_lock(&UDF_SB(sb)->s_alloc_mutex); ··· 2481 2482 epos.offset = sizeof(struct unallocSpaceEntry); 2482 2483 epos.bh = NULL; 2483 2484 2484 - while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1) 2485 + while (udf_next_aext(table, &epos, &eloc, &elen, 1) != -1) 2485 2486 accum += (elen >> table->i_sb->s_blocksize_bits); 2486 2487 2487 2488 brelse(epos.bh);