diff options
| -rw-r--r-- | fs/xfs/xfs_icache.c | 2 | ||||
| -rw-r--r-- | fs/xfs/xfs_icache.h | 1 | ||||
| -rw-r--r-- | fs/xfs/xfs_super.c | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 99ee6eee5e0b..fb39a66914dd 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c | |||
| @@ -765,7 +765,7 @@ restart: | |||
| 765 | * Background scanning to trim post-EOF preallocated space. This is queued | 765 | * Background scanning to trim post-EOF preallocated space. This is queued |
| 766 | * based on the 'speculative_prealloc_lifetime' tunable (5m by default). | 766 | * based on the 'speculative_prealloc_lifetime' tunable (5m by default). |
| 767 | */ | 767 | */ |
| 768 | STATIC void | 768 | void |
| 769 | xfs_queue_eofblocks( | 769 | xfs_queue_eofblocks( |
| 770 | struct xfs_mount *mp) | 770 | struct xfs_mount *mp) |
| 771 | { | 771 | { |
diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h index 62f1f91c32cb..05bac99bef75 100644 --- a/fs/xfs/xfs_icache.h +++ b/fs/xfs/xfs_icache.h | |||
| @@ -68,6 +68,7 @@ void xfs_inode_clear_eofblocks_tag(struct xfs_inode *ip); | |||
| 68 | int xfs_icache_free_eofblocks(struct xfs_mount *, struct xfs_eofblocks *); | 68 | int xfs_icache_free_eofblocks(struct xfs_mount *, struct xfs_eofblocks *); |
| 69 | int xfs_inode_free_quota_eofblocks(struct xfs_inode *ip); | 69 | int xfs_inode_free_quota_eofblocks(struct xfs_inode *ip); |
| 70 | void xfs_eofblocks_worker(struct work_struct *); | 70 | void xfs_eofblocks_worker(struct work_struct *); |
| 71 | void xfs_queue_eofblocks(struct xfs_mount *); | ||
| 71 | 72 | ||
| 72 | int xfs_inode_ag_iterator(struct xfs_mount *mp, | 73 | int xfs_inode_ag_iterator(struct xfs_mount *mp, |
| 73 | int (*execute)(struct xfs_inode *ip, int flags, void *args), | 74 | int (*execute)(struct xfs_inode *ip, int flags, void *args), |
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 11ea5d51db56..2d2810851871 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
| @@ -1294,6 +1294,7 @@ xfs_fs_remount( | |||
| 1294 | */ | 1294 | */ |
| 1295 | xfs_restore_resvblks(mp); | 1295 | xfs_restore_resvblks(mp); |
| 1296 | xfs_log_work_queue(mp); | 1296 | xfs_log_work_queue(mp); |
| 1297 | xfs_queue_eofblocks(mp); | ||
| 1297 | } | 1298 | } |
| 1298 | 1299 | ||
| 1299 | /* rw -> ro */ | 1300 | /* rw -> ro */ |
| @@ -1306,6 +1307,13 @@ xfs_fs_remount( | |||
| 1306 | * return it to the same size. | 1307 | * return it to the same size. |
| 1307 | */ | 1308 | */ |
| 1308 | xfs_save_resvblks(mp); | 1309 | xfs_save_resvblks(mp); |
| 1310 | |||
| 1311 | /* | ||
| 1312 | * Cancel background eofb scanning so it cannot race with the | ||
| 1313 | * final log force+buftarg wait and deadlock the remount. | ||
| 1314 | */ | ||
| 1315 | cancel_delayed_work_sync(&mp->m_eofblocks_work); | ||
| 1316 | |||
| 1309 | xfs_quiesce_attr(mp); | 1317 | xfs_quiesce_attr(mp); |
| 1310 | mp->m_flags |= XFS_MOUNT_RDONLY; | 1318 | mp->m_flags |= XFS_MOUNT_RDONLY; |
| 1311 | } | 1319 | } |
