-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmI7PZQACgkQnJ2qBz9k
 QNnW+QgA6c0mVip5ESE+RgRMLnajAFs0kmOzGEXpoa+QXvxrU3GuY5ssVAM4MlSx
 yzCnhlhHua3tci7rhTQ0pPrxBXStIxf/EqKB8y4ylwZhZAP3XdStvTsBizt1966m
 1GyQiAHQFLsIsbbXfXcAVClYBHSkD8zAElFLvVB08q8zFXMpkC+2oh/gpwAlOPYz
 uczYatJV4edx57E3yX2lQJfDZK8I3OeDKeladDzCliTim8zR8sZTfZU5seiM7rHU
 2XexWsM8tvUn33pvw6JE0GwOhp0ILBgMWxtA3Z1OVW+6+sngIQ4NsRRq/MaRy/ht
 zfOnNtPVyIf7DTgla0mqqPNM7/qZmQ==
 =AjOm
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2022-03-25 17:38:15 -07:00
commit a452c4eb40
5 changed files with 20 additions and 17 deletions

View File

@ -753,8 +753,12 @@ static loff_t ext2_max_size(int bits)
res += 1LL << (bits-2); res += 1LL << (bits-2);
res += 1LL << (2*(bits-2)); res += 1LL << (2*(bits-2));
res += 1LL << (3*(bits-2)); res += 1LL << (3*(bits-2));
/* Compute how many metadata blocks are needed */
meta_blocks = 1;
meta_blocks += 1 + ppb;
meta_blocks += 1 + ppb + ppb * ppb;
/* Does block tree limit file size? */ /* Does block tree limit file size? */
if (res < upper_limit) if (res + meta_blocks <= upper_limit)
goto check_lfs; goto check_lfs;
res = upper_limit; res = upper_limit;

View File

@ -1,10 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
config REISERFS_FS config REISERFS_FS
tristate "Reiserfs support" tristate "Reiserfs support (deprecated)"
select CRC32 select CRC32
help help
Stores not just filenames but the files themselves in a balanced Reiserfs is deprecated and scheduled to be removed from the kernel
tree. Uses journalling. in 2025. If you are still using it, please migrate to another
filesystem or tell us your usecase for reiserfs.
Reiserfs stores not just filenames but the files themselves in a
balanced tree. Uses journalling.
Balanced trees are more efficient than traditional file system Balanced trees are more efficient than traditional file system
architectural foundations. architectural foundations.

View File

@ -2763,13 +2763,6 @@ static int reiserfs_write_begin(struct file *file,
int old_ref = 0; int old_ref = 0;
inode = mapping->host; inode = mapping->host;
*fsdata = NULL;
if (flags & AOP_FLAG_CONT_EXPAND &&
(pos & (inode->i_sb->s_blocksize - 1)) == 0) {
pos ++;
*fsdata = (void *)(unsigned long)flags;
}
index = pos >> PAGE_SHIFT; index = pos >> PAGE_SHIFT;
page = grab_cache_page_write_begin(mapping, index, flags); page = grab_cache_page_write_begin(mapping, index, flags);
if (!page) if (!page)
@ -2896,9 +2889,6 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping,
unsigned start; unsigned start;
bool locked = false; bool locked = false;
if ((unsigned long)fsdata & AOP_FLAG_CONT_EXPAND)
pos ++;
reiserfs_wait_on_write_block(inode->i_sb); reiserfs_wait_on_write_block(inode->i_sb);
if (reiserfs_transaction_running(inode->i_sb)) if (reiserfs_transaction_running(inode->i_sb))
th = current->journal_info; th = current->journal_info;
@ -3316,7 +3306,11 @@ int reiserfs_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
/* fill in hole pointers in the expanding truncate case. */ /* fill in hole pointers in the expanding truncate case. */
if (attr->ia_size > inode->i_size) { if (attr->ia_size > inode->i_size) {
error = generic_cont_expand_simple(inode, attr->ia_size); loff_t pos = attr->ia_size;
if ((pos & (inode->i_sb->s_blocksize - 1)) == 0)
pos++;
error = generic_cont_expand_simple(inode, pos);
if (REISERFS_I(inode)->i_prealloc_count > 0) { if (REISERFS_I(inode)->i_prealloc_count > 0) {
int err; int err;
struct reiserfs_transaction_handle th; struct reiserfs_transaction_handle th;

View File

@ -1652,6 +1652,8 @@ static int read_super_block(struct super_block *s, int offset)
return 1; return 1;
} }
reiserfs_warning(NULL, "", "reiserfs filesystem is deprecated and "
"scheduled to be removed from the kernel in 2025");
SB_BUFFER_WITH_SB(s) = bh; SB_BUFFER_WITH_SB(s) = bh;
SB_DISK_SUPER_BLOCK(s) = rs; SB_DISK_SUPER_BLOCK(s) = rs;

View File

@ -2474,7 +2474,6 @@ static unsigned int udf_count_free_table(struct super_block *sb,
unsigned int accum = 0; unsigned int accum = 0;
uint32_t elen; uint32_t elen;
struct kernel_lb_addr eloc; struct kernel_lb_addr eloc;
int8_t etype;
struct extent_position epos; struct extent_position epos;
mutex_lock(&UDF_SB(sb)->s_alloc_mutex); mutex_lock(&UDF_SB(sb)->s_alloc_mutex);
@ -2482,7 +2481,7 @@ static unsigned int udf_count_free_table(struct super_block *sb,
epos.offset = sizeof(struct unallocSpaceEntry); epos.offset = sizeof(struct unallocSpaceEntry);
epos.bh = NULL; epos.bh = NULL;
while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1) while (udf_next_aext(table, &epos, &eloc, &elen, 1) != -1)
accum += (elen >> table->i_sb->s_blocksize_bits); accum += (elen >> table->i_sb->s_blocksize_bits);
brelse(epos.bh); brelse(epos.bh);