Loading fs/ext4/ext4.h +1 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,7 @@ struct mpage_da_data { */ #define EXT4_IO_END_UNWRITTEN 0x0001 #define EXT4_IO_END_ERROR 0x0002 #define EXT4_IO_END_QUEUED 0x0004 struct ext4_io_page { struct page *p_page; Loading fs/ext4/inode.c +0 −3 Original line number Diff line number Diff line Loading @@ -121,9 +121,6 @@ void ext4_evict_inode(struct inode *inode) trace_ext4_evict_inode(inode); mutex_lock(&inode->i_mutex); ext4_flush_completed_IO(inode); mutex_unlock(&inode->i_mutex); ext4_ioend_wait(inode); if (inode->i_nlink) { Loading fs/ext4/page-io.c +17 −1 Original line number Diff line number Diff line Loading @@ -142,7 +142,23 @@ static void ext4_end_io_work(struct work_struct *work) unsigned long flags; int ret; mutex_lock(&inode->i_mutex); if (!mutex_trylock(&inode->i_mutex)) { /* * Requeue the work instead of waiting so that the work * items queued after this can be processed. */ queue_work(EXT4_SB(inode->i_sb)->dio_unwritten_wq, &io->work); /* * To prevent the ext4-dio-unwritten thread from keeping * requeueing end_io requests and occupying cpu for too long, * yield the cpu if it sees an end_io request that has already * been requeued. */ if (io->flag & EXT4_IO_END_QUEUED) yield(); io->flag |= EXT4_IO_END_QUEUED; return; } ret = ext4_end_io_nolock(io); if (ret < 0) { mutex_unlock(&inode->i_mutex); Loading Loading
fs/ext4/ext4.h +1 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,7 @@ struct mpage_da_data { */ #define EXT4_IO_END_UNWRITTEN 0x0001 #define EXT4_IO_END_ERROR 0x0002 #define EXT4_IO_END_QUEUED 0x0004 struct ext4_io_page { struct page *p_page; Loading
fs/ext4/inode.c +0 −3 Original line number Diff line number Diff line Loading @@ -121,9 +121,6 @@ void ext4_evict_inode(struct inode *inode) trace_ext4_evict_inode(inode); mutex_lock(&inode->i_mutex); ext4_flush_completed_IO(inode); mutex_unlock(&inode->i_mutex); ext4_ioend_wait(inode); if (inode->i_nlink) { Loading
fs/ext4/page-io.c +17 −1 Original line number Diff line number Diff line Loading @@ -142,7 +142,23 @@ static void ext4_end_io_work(struct work_struct *work) unsigned long flags; int ret; mutex_lock(&inode->i_mutex); if (!mutex_trylock(&inode->i_mutex)) { /* * Requeue the work instead of waiting so that the work * items queued after this can be processed. */ queue_work(EXT4_SB(inode->i_sb)->dio_unwritten_wq, &io->work); /* * To prevent the ext4-dio-unwritten thread from keeping * requeueing end_io requests and occupying cpu for too long, * yield the cpu if it sees an end_io request that has already * been requeued. */ if (io->flag & EXT4_IO_END_QUEUED) yield(); io->flag |= EXT4_IO_END_QUEUED; return; } ret = ext4_end_io_nolock(io); if (ret < 0) { mutex_unlock(&inode->i_mutex); Loading