mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
\n
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmAJfUoACgkQnJ2qBz9k QNnH+Qf/Q/e0zGxGW7Snj6Kz4VL9yHwfvQUdZPFashv+Uff1jnPkXQbnJia2mUNE 6g4XsMTuXTF13TvNmf93MBHAmlJSicUfRNqyDx9HP0VrNy2NarIwDcN4yAoOs2cZ jwzwOVDJmDf/EALVv+6JUySRq/v5f4EEihtYjVEXxVNh7rZiLOBYnY5wPLvicU3h ButzuOnH0F4aqBKuZsanJYDIswmJ05awxy4wu4SWoyghc+KUc61pXeND1KHa4LoR 1A4NL7OcjZkpHvaWCw8FKgEQnyTyvbi78aSSrOLcZhdT6l5jQt8xaRwz66zk9Yw2 mxQe9YefTcvlmm8iNn3B7QxMmJmZ7g== =agn9 -----END PGP SIGNATURE----- Merge tag 'fs_for_v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fs and udf fixes from Jan Kara: "A lazytime handling fix from Eric Biggers and a fix of UDF session handling for large devices" * tag 'fs_for_v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: fix the problem that the disc content is not displayed fs: fix lazytime expiration handling in __writeback_single_inode()
This commit is contained in:
commit
9f29bd8b2e
@ -1473,22 +1473,26 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
ret = err;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the inode has dirty timestamps and we need to write them, call
|
||||
* mark_inode_dirty_sync() to notify the filesystem about it and to
|
||||
* change I_DIRTY_TIME into I_DIRTY_SYNC.
|
||||
*/
|
||||
if ((inode->i_state & I_DIRTY_TIME) &&
|
||||
(wbc->sync_mode == WB_SYNC_ALL || wbc->for_sync ||
|
||||
time_after(jiffies, inode->dirtied_time_when +
|
||||
dirtytime_expire_interval * HZ))) {
|
||||
trace_writeback_lazytime(inode);
|
||||
mark_inode_dirty_sync(inode);
|
||||
}
|
||||
|
||||
/*
|
||||
* Some filesystems may redirty the inode during the writeback
|
||||
* due to delalloc, clear dirty metadata flags right before
|
||||
* write_inode()
|
||||
*/
|
||||
spin_lock(&inode->i_lock);
|
||||
|
||||
dirty = inode->i_state & I_DIRTY;
|
||||
if ((inode->i_state & I_DIRTY_TIME) &&
|
||||
((dirty & I_DIRTY_INODE) ||
|
||||
wbc->sync_mode == WB_SYNC_ALL || wbc->for_sync ||
|
||||
time_after(jiffies, inode->dirtied_time_when +
|
||||
dirtytime_expire_interval * HZ))) {
|
||||
dirty |= I_DIRTY_TIME;
|
||||
trace_writeback_lazytime(inode);
|
||||
}
|
||||
inode->i_state &= ~dirty;
|
||||
|
||||
/*
|
||||
@ -1509,8 +1513,6 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
|
||||
spin_unlock(&inode->i_lock);
|
||||
|
||||
if (dirty & I_DIRTY_TIME)
|
||||
mark_inode_dirty_sync(inode);
|
||||
/* Don't write the inode if only I_DIRTY_PAGES was set */
|
||||
if (dirty & ~I_DIRTY_PAGES) {
|
||||
int err = write_inode(inode, wbc);
|
||||
|
@ -705,6 +705,7 @@ static int udf_check_vsd(struct super_block *sb)
|
||||
struct buffer_head *bh = NULL;
|
||||
int nsr = 0;
|
||||
struct udf_sb_info *sbi;
|
||||
loff_t session_offset;
|
||||
|
||||
sbi = UDF_SB(sb);
|
||||
if (sb->s_blocksize < sizeof(struct volStructDesc))
|
||||
@ -712,7 +713,8 @@ static int udf_check_vsd(struct super_block *sb)
|
||||
else
|
||||
sectorsize = sb->s_blocksize;
|
||||
|
||||
sector += (((loff_t)sbi->s_session) << sb->s_blocksize_bits);
|
||||
session_offset = (loff_t)sbi->s_session << sb->s_blocksize_bits;
|
||||
sector += session_offset;
|
||||
|
||||
udf_debug("Starting at sector %u (%lu byte sectors)\n",
|
||||
(unsigned int)(sector >> sb->s_blocksize_bits),
|
||||
@ -757,8 +759,7 @@ static int udf_check_vsd(struct super_block *sb)
|
||||
|
||||
if (nsr > 0)
|
||||
return 1;
|
||||
else if (!bh && sector - (sbi->s_session << sb->s_blocksize_bits) ==
|
||||
VSD_FIRST_SECTOR_OFFSET)
|
||||
else if (!bh && sector - session_offset == VSD_FIRST_SECTOR_OFFSET)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user