David Chinner | fe4fa4b | 2008-10-30 17:06:08 +1100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License as |
| 7 | * published by the Free Software Foundation. |
| 8 | * |
| 9 | * This program is distributed in the hope that it would be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write the Free Software Foundation, |
| 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | */ |
| 18 | #include "xfs.h" |
| 19 | #include "xfs_fs.h" |
| 20 | #include "xfs_types.h" |
| 21 | #include "xfs_bit.h" |
| 22 | #include "xfs_log.h" |
| 23 | #include "xfs_inum.h" |
| 24 | #include "xfs_trans.h" |
| 25 | #include "xfs_sb.h" |
| 26 | #include "xfs_ag.h" |
| 27 | #include "xfs_dir2.h" |
| 28 | #include "xfs_dmapi.h" |
| 29 | #include "xfs_mount.h" |
| 30 | #include "xfs_bmap_btree.h" |
| 31 | #include "xfs_alloc_btree.h" |
| 32 | #include "xfs_ialloc_btree.h" |
| 33 | #include "xfs_btree.h" |
| 34 | #include "xfs_dir2_sf.h" |
| 35 | #include "xfs_attr_sf.h" |
| 36 | #include "xfs_inode.h" |
| 37 | #include "xfs_dinode.h" |
| 38 | #include "xfs_error.h" |
| 39 | #include "xfs_mru_cache.h" |
| 40 | #include "xfs_filestream.h" |
| 41 | #include "xfs_vnodeops.h" |
| 42 | #include "xfs_utils.h" |
| 43 | #include "xfs_buf_item.h" |
| 44 | #include "xfs_inode_item.h" |
| 45 | #include "xfs_rw.h" |
Christoph Hellwig | 7d09525 | 2009-06-08 15:33:32 +0200 | [diff] [blame] | 46 | #include "xfs_quota.h" |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame^] | 47 | #include "xfs_trace.h" |
David Chinner | fe4fa4b | 2008-10-30 17:06:08 +1100 | [diff] [blame] | 48 | |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 49 | #include <linux/kthread.h> |
| 50 | #include <linux/freezer.h> |
| 51 | |
Dave Chinner | 5a34d5c | 2009-06-08 15:35:03 +0200 | [diff] [blame] | 52 | |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 53 | STATIC xfs_inode_t * |
| 54 | xfs_inode_ag_lookup( |
| 55 | struct xfs_mount *mp, |
| 56 | struct xfs_perag *pag, |
| 57 | uint32_t *first_index, |
| 58 | int tag) |
| 59 | { |
| 60 | int nr_found; |
| 61 | struct xfs_inode *ip; |
| 62 | |
| 63 | /* |
| 64 | * use a gang lookup to find the next inode in the tree |
| 65 | * as the tree is sparse and a gang lookup walks to find |
| 66 | * the number of objects requested. |
| 67 | */ |
| 68 | read_lock(&pag->pag_ici_lock); |
| 69 | if (tag == XFS_ICI_NO_TAG) { |
| 70 | nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, |
| 71 | (void **)&ip, *first_index, 1); |
| 72 | } else { |
| 73 | nr_found = radix_tree_gang_lookup_tag(&pag->pag_ici_root, |
| 74 | (void **)&ip, *first_index, 1, tag); |
| 75 | } |
| 76 | if (!nr_found) |
| 77 | goto unlock; |
| 78 | |
| 79 | /* |
| 80 | * Update the index for the next lookup. Catch overflows |
| 81 | * into the next AG range which can occur if we have inodes |
| 82 | * in the last block of the AG and we are currently |
| 83 | * pointing to the last inode. |
| 84 | */ |
| 85 | *first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); |
| 86 | if (*first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) |
| 87 | goto unlock; |
| 88 | |
| 89 | return ip; |
| 90 | |
| 91 | unlock: |
| 92 | read_unlock(&pag->pag_ici_lock); |
| 93 | return NULL; |
| 94 | } |
| 95 | |
| 96 | STATIC int |
| 97 | xfs_inode_ag_walk( |
| 98 | struct xfs_mount *mp, |
| 99 | xfs_agnumber_t ag, |
| 100 | int (*execute)(struct xfs_inode *ip, |
| 101 | struct xfs_perag *pag, int flags), |
| 102 | int flags, |
| 103 | int tag) |
| 104 | { |
| 105 | struct xfs_perag *pag = &mp->m_perag[ag]; |
| 106 | uint32_t first_index; |
| 107 | int last_error = 0; |
| 108 | int skipped; |
| 109 | |
| 110 | restart: |
| 111 | skipped = 0; |
| 112 | first_index = 0; |
| 113 | do { |
| 114 | int error = 0; |
| 115 | xfs_inode_t *ip; |
| 116 | |
| 117 | ip = xfs_inode_ag_lookup(mp, pag, &first_index, tag); |
| 118 | if (!ip) |
| 119 | break; |
| 120 | |
| 121 | error = execute(ip, pag, flags); |
| 122 | if (error == EAGAIN) { |
| 123 | skipped++; |
| 124 | continue; |
| 125 | } |
| 126 | if (error) |
| 127 | last_error = error; |
| 128 | /* |
| 129 | * bail out if the filesystem is corrupted. |
| 130 | */ |
| 131 | if (error == EFSCORRUPTED) |
| 132 | break; |
| 133 | |
| 134 | } while (1); |
| 135 | |
| 136 | if (skipped) { |
| 137 | delay(1); |
| 138 | goto restart; |
| 139 | } |
| 140 | |
| 141 | xfs_put_perag(mp, pag); |
| 142 | return last_error; |
| 143 | } |
| 144 | |
Christoph Hellwig | fe588ed | 2009-06-08 15:35:27 +0200 | [diff] [blame] | 145 | int |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 146 | xfs_inode_ag_iterator( |
| 147 | struct xfs_mount *mp, |
| 148 | int (*execute)(struct xfs_inode *ip, |
| 149 | struct xfs_perag *pag, int flags), |
| 150 | int flags, |
| 151 | int tag) |
| 152 | { |
| 153 | int error = 0; |
| 154 | int last_error = 0; |
| 155 | xfs_agnumber_t ag; |
| 156 | |
| 157 | for (ag = 0; ag < mp->m_sb.sb_agcount; ag++) { |
| 158 | if (!mp->m_perag[ag].pag_ici_init) |
| 159 | continue; |
| 160 | error = xfs_inode_ag_walk(mp, ag, execute, flags, tag); |
| 161 | if (error) { |
| 162 | last_error = error; |
| 163 | if (error == EFSCORRUPTED) |
| 164 | break; |
| 165 | } |
| 166 | } |
| 167 | return XFS_ERROR(last_error); |
| 168 | } |
| 169 | |
Dave Chinner | 1da8eec | 2009-06-08 15:35:07 +0200 | [diff] [blame] | 170 | /* must be called with pag_ici_lock held and releases it */ |
Christoph Hellwig | fe588ed | 2009-06-08 15:35:27 +0200 | [diff] [blame] | 171 | int |
Dave Chinner | 1da8eec | 2009-06-08 15:35:07 +0200 | [diff] [blame] | 172 | xfs_sync_inode_valid( |
| 173 | struct xfs_inode *ip, |
| 174 | struct xfs_perag *pag) |
| 175 | { |
| 176 | struct inode *inode = VFS_I(ip); |
| 177 | |
| 178 | /* nothing to sync during shutdown */ |
| 179 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) { |
| 180 | read_unlock(&pag->pag_ici_lock); |
| 181 | return EFSCORRUPTED; |
| 182 | } |
| 183 | |
| 184 | /* |
| 185 | * If we can't get a reference on the inode, it must be in reclaim. |
| 186 | * Leave it for the reclaim code to flush. Also avoid inodes that |
| 187 | * haven't been fully initialised. |
| 188 | */ |
| 189 | if (!igrab(inode)) { |
| 190 | read_unlock(&pag->pag_ici_lock); |
| 191 | return ENOENT; |
| 192 | } |
| 193 | read_unlock(&pag->pag_ici_lock); |
| 194 | |
| 195 | if (is_bad_inode(inode) || xfs_iflags_test(ip, XFS_INEW)) { |
| 196 | IRELE(ip); |
| 197 | return ENOENT; |
| 198 | } |
| 199 | |
| 200 | return 0; |
| 201 | } |
| 202 | |
Dave Chinner | 5a34d5c | 2009-06-08 15:35:03 +0200 | [diff] [blame] | 203 | STATIC int |
| 204 | xfs_sync_inode_data( |
| 205 | struct xfs_inode *ip, |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 206 | struct xfs_perag *pag, |
Dave Chinner | 5a34d5c | 2009-06-08 15:35:03 +0200 | [diff] [blame] | 207 | int flags) |
| 208 | { |
| 209 | struct inode *inode = VFS_I(ip); |
| 210 | struct address_space *mapping = inode->i_mapping; |
| 211 | int error = 0; |
| 212 | |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 213 | error = xfs_sync_inode_valid(ip, pag); |
| 214 | if (error) |
| 215 | return error; |
| 216 | |
Dave Chinner | 5a34d5c | 2009-06-08 15:35:03 +0200 | [diff] [blame] | 217 | if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) |
| 218 | goto out_wait; |
| 219 | |
| 220 | if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) { |
| 221 | if (flags & SYNC_TRYLOCK) |
| 222 | goto out_wait; |
| 223 | xfs_ilock(ip, XFS_IOLOCK_SHARED); |
| 224 | } |
| 225 | |
| 226 | error = xfs_flush_pages(ip, 0, -1, (flags & SYNC_WAIT) ? |
| 227 | 0 : XFS_B_ASYNC, FI_NONE); |
| 228 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
| 229 | |
| 230 | out_wait: |
Christoph Hellwig | b0710cc | 2009-06-08 15:37:11 +0200 | [diff] [blame] | 231 | if (flags & SYNC_WAIT) |
Dave Chinner | 5a34d5c | 2009-06-08 15:35:03 +0200 | [diff] [blame] | 232 | xfs_ioend_wait(ip); |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 233 | IRELE(ip); |
Dave Chinner | 5a34d5c | 2009-06-08 15:35:03 +0200 | [diff] [blame] | 234 | return error; |
| 235 | } |
| 236 | |
Christoph Hellwig | 845b6d0 | 2009-06-08 15:35:05 +0200 | [diff] [blame] | 237 | STATIC int |
| 238 | xfs_sync_inode_attr( |
| 239 | struct xfs_inode *ip, |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 240 | struct xfs_perag *pag, |
Christoph Hellwig | 845b6d0 | 2009-06-08 15:35:05 +0200 | [diff] [blame] | 241 | int flags) |
| 242 | { |
| 243 | int error = 0; |
| 244 | |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 245 | error = xfs_sync_inode_valid(ip, pag); |
| 246 | if (error) |
| 247 | return error; |
| 248 | |
Christoph Hellwig | 845b6d0 | 2009-06-08 15:35:05 +0200 | [diff] [blame] | 249 | xfs_ilock(ip, XFS_ILOCK_SHARED); |
| 250 | if (xfs_inode_clean(ip)) |
| 251 | goto out_unlock; |
| 252 | if (!xfs_iflock_nowait(ip)) { |
| 253 | if (!(flags & SYNC_WAIT)) |
| 254 | goto out_unlock; |
| 255 | xfs_iflock(ip); |
| 256 | } |
| 257 | |
| 258 | if (xfs_inode_clean(ip)) { |
| 259 | xfs_ifunlock(ip); |
| 260 | goto out_unlock; |
| 261 | } |
| 262 | |
| 263 | error = xfs_iflush(ip, (flags & SYNC_WAIT) ? |
| 264 | XFS_IFLUSH_SYNC : XFS_IFLUSH_DELWRI); |
| 265 | |
| 266 | out_unlock: |
| 267 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 268 | IRELE(ip); |
Christoph Hellwig | 845b6d0 | 2009-06-08 15:35:05 +0200 | [diff] [blame] | 269 | return error; |
| 270 | } |
| 271 | |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 272 | /* |
| 273 | * Write out pagecache data for the whole filesystem. |
| 274 | */ |
David Chinner | fe4fa4b | 2008-10-30 17:06:08 +1100 | [diff] [blame] | 275 | int |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 276 | xfs_sync_data( |
| 277 | struct xfs_mount *mp, |
| 278 | int flags) |
David Chinner | fe4fa4b | 2008-10-30 17:06:08 +1100 | [diff] [blame] | 279 | { |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 280 | int error; |
David Chinner | fe4fa4b | 2008-10-30 17:06:08 +1100 | [diff] [blame] | 281 | |
Christoph Hellwig | b0710cc | 2009-06-08 15:37:11 +0200 | [diff] [blame] | 282 | ASSERT((flags & ~(SYNC_TRYLOCK|SYNC_WAIT)) == 0); |
David Chinner | fe4fa4b | 2008-10-30 17:06:08 +1100 | [diff] [blame] | 283 | |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 284 | error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, |
| 285 | XFS_ICI_NO_TAG); |
| 286 | if (error) |
| 287 | return XFS_ERROR(error); |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 288 | |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 289 | xfs_log_force(mp, 0, |
| 290 | (flags & SYNC_WAIT) ? |
| 291 | XFS_LOG_FORCE | XFS_LOG_SYNC : |
| 292 | XFS_LOG_FORCE); |
| 293 | return 0; |
| 294 | } |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 295 | |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 296 | /* |
| 297 | * Write out inode metadata (attributes) for the whole filesystem. |
| 298 | */ |
| 299 | int |
| 300 | xfs_sync_attr( |
| 301 | struct xfs_mount *mp, |
| 302 | int flags) |
| 303 | { |
| 304 | ASSERT((flags & ~SYNC_WAIT) == 0); |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 305 | |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 306 | return xfs_inode_ag_iterator(mp, xfs_sync_inode_attr, flags, |
| 307 | XFS_ICI_NO_TAG); |
David Chinner | fe4fa4b | 2008-10-30 17:06:08 +1100 | [diff] [blame] | 308 | } |
| 309 | |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 310 | STATIC int |
| 311 | xfs_commit_dummy_trans( |
| 312 | struct xfs_mount *mp, |
Dave Chinner | dce5065 | 2009-10-06 20:29:30 +0000 | [diff] [blame] | 313 | uint flags) |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 314 | { |
| 315 | struct xfs_inode *ip = mp->m_rootip; |
| 316 | struct xfs_trans *tp; |
| 317 | int error; |
Dave Chinner | dce5065 | 2009-10-06 20:29:30 +0000 | [diff] [blame] | 318 | int log_flags = XFS_LOG_FORCE; |
| 319 | |
| 320 | if (flags & SYNC_WAIT) |
| 321 | log_flags |= XFS_LOG_SYNC; |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 322 | |
| 323 | /* |
| 324 | * Put a dummy transaction in the log to tell recovery |
| 325 | * that all others are OK. |
| 326 | */ |
| 327 | tp = xfs_trans_alloc(mp, XFS_TRANS_DUMMY1); |
| 328 | error = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0); |
| 329 | if (error) { |
| 330 | xfs_trans_cancel(tp, 0); |
| 331 | return error; |
| 332 | } |
| 333 | |
| 334 | xfs_ilock(ip, XFS_ILOCK_EXCL); |
| 335 | |
| 336 | xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); |
| 337 | xfs_trans_ihold(tp, ip); |
| 338 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 339 | error = xfs_trans_commit(tp, 0); |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 340 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
| 341 | |
Dave Chinner | dce5065 | 2009-10-06 20:29:30 +0000 | [diff] [blame] | 342 | /* the log force ensures this transaction is pushed to disk */ |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 343 | xfs_log_force(mp, 0, log_flags); |
Dave Chinner | dce5065 | 2009-10-06 20:29:30 +0000 | [diff] [blame] | 344 | return error; |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 345 | } |
| 346 | |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 347 | int |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 348 | xfs_sync_fsdata( |
| 349 | struct xfs_mount *mp, |
| 350 | int flags) |
| 351 | { |
| 352 | struct xfs_buf *bp; |
| 353 | struct xfs_buf_log_item *bip; |
| 354 | int error = 0; |
| 355 | |
| 356 | /* |
| 357 | * If this is xfssyncd() then only sync the superblock if we can |
| 358 | * lock it without sleeping and it is not pinned. |
| 359 | */ |
Christoph Hellwig | 8b5403a | 2009-06-08 15:37:16 +0200 | [diff] [blame] | 360 | if (flags & SYNC_TRYLOCK) { |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 361 | ASSERT(!(flags & SYNC_WAIT)); |
| 362 | |
| 363 | bp = xfs_getsb(mp, XFS_BUF_TRYLOCK); |
| 364 | if (!bp) |
| 365 | goto out; |
| 366 | |
| 367 | bip = XFS_BUF_FSPRIVATE(bp, struct xfs_buf_log_item *); |
| 368 | if (!bip || !xfs_buf_item_dirty(bip) || XFS_BUF_ISPINNED(bp)) |
| 369 | goto out_brelse; |
| 370 | } else { |
| 371 | bp = xfs_getsb(mp, 0); |
| 372 | |
| 373 | /* |
| 374 | * If the buffer is pinned then push on the log so we won't |
| 375 | * get stuck waiting in the write for someone, maybe |
| 376 | * ourselves, to flush the log. |
| 377 | * |
| 378 | * Even though we just pushed the log above, we did not have |
| 379 | * the superblock buffer locked at that point so it can |
| 380 | * become pinned in between there and here. |
| 381 | */ |
| 382 | if (XFS_BUF_ISPINNED(bp)) |
| 383 | xfs_log_force(mp, 0, XFS_LOG_FORCE); |
| 384 | } |
| 385 | |
| 386 | |
| 387 | if (flags & SYNC_WAIT) |
| 388 | XFS_BUF_UNASYNC(bp); |
| 389 | else |
| 390 | XFS_BUF_ASYNC(bp); |
| 391 | |
Dave Chinner | dce5065 | 2009-10-06 20:29:30 +0000 | [diff] [blame] | 392 | error = xfs_bwrite(mp, bp); |
| 393 | if (error) |
| 394 | return error; |
| 395 | |
| 396 | /* |
| 397 | * If this is a data integrity sync make sure all pending buffers |
| 398 | * are flushed out for the log coverage check below. |
| 399 | */ |
| 400 | if (flags & SYNC_WAIT) |
| 401 | xfs_flush_buftarg(mp->m_ddev_targp, 1); |
| 402 | |
| 403 | if (xfs_log_need_covered(mp)) |
| 404 | error = xfs_commit_dummy_trans(mp, flags); |
| 405 | return error; |
Christoph Hellwig | 2af75df | 2008-10-30 17:14:53 +1100 | [diff] [blame] | 406 | |
| 407 | out_brelse: |
| 408 | xfs_buf_relse(bp); |
| 409 | out: |
| 410 | return error; |
| 411 | } |
| 412 | |
David Chinner | fe4fa4b | 2008-10-30 17:06:08 +1100 | [diff] [blame] | 413 | /* |
David Chinner | a4e4c4f | 2008-10-30 17:16:11 +1100 | [diff] [blame] | 414 | * When remounting a filesystem read-only or freezing the filesystem, we have |
| 415 | * two phases to execute. This first phase is syncing the data before we |
| 416 | * quiesce the filesystem, and the second is flushing all the inodes out after |
| 417 | * we've waited for all the transactions created by the first phase to |
| 418 | * complete. The second phase ensures that the inodes are written to their |
| 419 | * location on disk rather than just existing in transactions in the log. This |
| 420 | * means after a quiesce there is no log replay required to write the inodes to |
| 421 | * disk (this is the main difference between a sync and a quiesce). |
| 422 | */ |
| 423 | /* |
| 424 | * First stage of freeze - no writers will make progress now we are here, |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 425 | * so we flush delwri and delalloc buffers here, then wait for all I/O to |
| 426 | * complete. Data is frozen at that point. Metadata is not frozen, |
David Chinner | a4e4c4f | 2008-10-30 17:16:11 +1100 | [diff] [blame] | 427 | * transactions can still occur here so don't bother flushing the buftarg |
| 428 | * because it'll just get dirty again. |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 429 | */ |
| 430 | int |
| 431 | xfs_quiesce_data( |
| 432 | struct xfs_mount *mp) |
| 433 | { |
| 434 | int error; |
| 435 | |
| 436 | /* push non-blocking */ |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 437 | xfs_sync_data(mp, 0); |
Christoph Hellwig | 8b5403a | 2009-06-08 15:37:16 +0200 | [diff] [blame] | 438 | xfs_qm_sync(mp, SYNC_TRYLOCK); |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 439 | |
Dave Chinner | c90b07e | 2009-10-06 20:29:27 +0000 | [diff] [blame] | 440 | /* push and block till complete */ |
Christoph Hellwig | b0710cc | 2009-06-08 15:37:11 +0200 | [diff] [blame] | 441 | xfs_sync_data(mp, SYNC_WAIT); |
Christoph Hellwig | 7d09525 | 2009-06-08 15:33:32 +0200 | [diff] [blame] | 442 | xfs_qm_sync(mp, SYNC_WAIT); |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 443 | |
Dave Chinner | c90b07e | 2009-10-06 20:29:27 +0000 | [diff] [blame] | 444 | /* drop inode references pinned by filestreams */ |
| 445 | xfs_filestream_flush(mp); |
| 446 | |
David Chinner | a4e4c4f | 2008-10-30 17:16:11 +1100 | [diff] [blame] | 447 | /* write superblock and hoover up shutdown errors */ |
Dave Chinner | c90b07e | 2009-10-06 20:29:27 +0000 | [diff] [blame] | 448 | error = xfs_sync_fsdata(mp, SYNC_WAIT); |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 449 | |
David Chinner | a4e4c4f | 2008-10-30 17:16:11 +1100 | [diff] [blame] | 450 | /* flush data-only devices */ |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 451 | if (mp->m_rtdev_targp) |
| 452 | XFS_bflush(mp->m_rtdev_targp); |
| 453 | |
| 454 | return error; |
| 455 | } |
| 456 | |
David Chinner | 76bf105 | 2008-10-30 17:16:21 +1100 | [diff] [blame] | 457 | STATIC void |
| 458 | xfs_quiesce_fs( |
| 459 | struct xfs_mount *mp) |
| 460 | { |
| 461 | int count = 0, pincount; |
| 462 | |
| 463 | xfs_flush_buftarg(mp->m_ddev_targp, 0); |
Dave Chinner | abc1064 | 2009-06-08 15:35:12 +0200 | [diff] [blame] | 464 | xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); |
David Chinner | 76bf105 | 2008-10-30 17:16:21 +1100 | [diff] [blame] | 465 | |
| 466 | /* |
| 467 | * This loop must run at least twice. The first instance of the loop |
| 468 | * will flush most meta data but that will generate more meta data |
| 469 | * (typically directory updates). Which then must be flushed and |
| 470 | * logged before we can write the unmount record. |
| 471 | */ |
| 472 | do { |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 473 | xfs_sync_attr(mp, SYNC_WAIT); |
David Chinner | 76bf105 | 2008-10-30 17:16:21 +1100 | [diff] [blame] | 474 | pincount = xfs_flush_buftarg(mp->m_ddev_targp, 1); |
| 475 | if (!pincount) { |
| 476 | delay(50); |
| 477 | count++; |
| 478 | } |
| 479 | } while (count < 2); |
| 480 | } |
| 481 | |
| 482 | /* |
| 483 | * Second stage of a quiesce. The data is already synced, now we have to take |
| 484 | * care of the metadata. New transactions are already blocked, so we need to |
| 485 | * wait for any remaining transactions to drain out before proceding. |
| 486 | */ |
| 487 | void |
| 488 | xfs_quiesce_attr( |
| 489 | struct xfs_mount *mp) |
| 490 | { |
| 491 | int error = 0; |
| 492 | |
| 493 | /* wait for all modifications to complete */ |
| 494 | while (atomic_read(&mp->m_active_trans) > 0) |
| 495 | delay(100); |
| 496 | |
| 497 | /* flush inodes and push all remaining buffers out to disk */ |
| 498 | xfs_quiesce_fs(mp); |
| 499 | |
Felix Blyakher | 5e10657 | 2009-01-22 21:34:05 -0600 | [diff] [blame] | 500 | /* |
| 501 | * Just warn here till VFS can correctly support |
| 502 | * read-only remount without racing. |
| 503 | */ |
| 504 | WARN_ON(atomic_read(&mp->m_active_trans) != 0); |
David Chinner | 76bf105 | 2008-10-30 17:16:21 +1100 | [diff] [blame] | 505 | |
| 506 | /* Push the superblock and write an unmount record */ |
| 507 | error = xfs_log_sbcount(mp, 1); |
| 508 | if (error) |
| 509 | xfs_fs_cmn_err(CE_WARN, mp, |
| 510 | "xfs_attr_quiesce: failed to log sb changes. " |
| 511 | "Frozen image may not be consistent."); |
| 512 | xfs_log_unmount_write(mp); |
| 513 | xfs_unmountfs_writesb(mp); |
| 514 | } |
| 515 | |
David Chinner | e9f1c6e | 2008-10-30 17:15:50 +1100 | [diff] [blame] | 516 | /* |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 517 | * Enqueue a work item to be picked up by the vfs xfssyncd thread. |
| 518 | * Doing this has two advantages: |
| 519 | * - It saves on stack space, which is tight in certain situations |
| 520 | * - It can be used (with care) as a mechanism to avoid deadlocks. |
| 521 | * Flushing while allocating in a full filesystem requires both. |
| 522 | */ |
| 523 | STATIC void |
| 524 | xfs_syncd_queue_work( |
| 525 | struct xfs_mount *mp, |
| 526 | void *data, |
Dave Chinner | e43afd7 | 2009-04-06 18:47:27 +0200 | [diff] [blame] | 527 | void (*syncer)(struct xfs_mount *, void *), |
| 528 | struct completion *completion) |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 529 | { |
Dave Chinner | a8d770d | 2009-04-06 18:44:54 +0200 | [diff] [blame] | 530 | struct xfs_sync_work *work; |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 531 | |
Dave Chinner | a8d770d | 2009-04-06 18:44:54 +0200 | [diff] [blame] | 532 | work = kmem_alloc(sizeof(struct xfs_sync_work), KM_SLEEP); |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 533 | INIT_LIST_HEAD(&work->w_list); |
| 534 | work->w_syncer = syncer; |
| 535 | work->w_data = data; |
| 536 | work->w_mount = mp; |
Dave Chinner | e43afd7 | 2009-04-06 18:47:27 +0200 | [diff] [blame] | 537 | work->w_completion = completion; |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 538 | spin_lock(&mp->m_sync_lock); |
| 539 | list_add_tail(&work->w_list, &mp->m_sync_list); |
| 540 | spin_unlock(&mp->m_sync_lock); |
| 541 | wake_up_process(mp->m_sync_task); |
| 542 | } |
| 543 | |
| 544 | /* |
| 545 | * Flush delayed allocate data, attempting to free up reserved space |
| 546 | * from existing allocations. At this point a new allocation attempt |
| 547 | * has failed with ENOSPC and we are in the process of scratching our |
| 548 | * heads, looking about for more room... |
| 549 | */ |
| 550 | STATIC void |
Dave Chinner | a8d770d | 2009-04-06 18:44:54 +0200 | [diff] [blame] | 551 | xfs_flush_inodes_work( |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 552 | struct xfs_mount *mp, |
| 553 | void *arg) |
| 554 | { |
| 555 | struct inode *inode = arg; |
Christoph Hellwig | 075fe10 | 2009-06-08 15:35:48 +0200 | [diff] [blame] | 556 | xfs_sync_data(mp, SYNC_TRYLOCK); |
Christoph Hellwig | b0710cc | 2009-06-08 15:37:11 +0200 | [diff] [blame] | 557 | xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_WAIT); |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 558 | iput(inode); |
| 559 | } |
| 560 | |
| 561 | void |
Dave Chinner | a8d770d | 2009-04-06 18:44:54 +0200 | [diff] [blame] | 562 | xfs_flush_inodes( |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 563 | xfs_inode_t *ip) |
| 564 | { |
| 565 | struct inode *inode = VFS_I(ip); |
Dave Chinner | e43afd7 | 2009-04-06 18:47:27 +0200 | [diff] [blame] | 566 | DECLARE_COMPLETION_ONSTACK(completion); |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 567 | |
| 568 | igrab(inode); |
Dave Chinner | e43afd7 | 2009-04-06 18:47:27 +0200 | [diff] [blame] | 569 | xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inodes_work, &completion); |
| 570 | wait_for_completion(&completion); |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 571 | xfs_log_force(ip->i_mount, (xfs_lsn_t)0, XFS_LOG_FORCE|XFS_LOG_SYNC); |
| 572 | } |
| 573 | |
David Chinner | aacaa88 | 2008-10-30 17:15:29 +1100 | [diff] [blame] | 574 | /* |
| 575 | * Every sync period we need to unpin all items, reclaim inodes, sync |
| 576 | * quota and write out the superblock. We might need to cover the log |
| 577 | * to indicate it is idle. |
| 578 | */ |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 579 | STATIC void |
| 580 | xfs_sync_worker( |
| 581 | struct xfs_mount *mp, |
| 582 | void *unused) |
| 583 | { |
| 584 | int error; |
| 585 | |
David Chinner | aacaa88 | 2008-10-30 17:15:29 +1100 | [diff] [blame] | 586 | if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { |
| 587 | xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); |
Dave Chinner | abc1064 | 2009-06-08 15:35:12 +0200 | [diff] [blame] | 588 | xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); |
David Chinner | aacaa88 | 2008-10-30 17:15:29 +1100 | [diff] [blame] | 589 | /* dgc: errors ignored here */ |
Christoph Hellwig | 8b5403a | 2009-06-08 15:37:16 +0200 | [diff] [blame] | 590 | error = xfs_qm_sync(mp, SYNC_TRYLOCK); |
| 591 | error = xfs_sync_fsdata(mp, SYNC_TRYLOCK); |
David Chinner | aacaa88 | 2008-10-30 17:15:29 +1100 | [diff] [blame] | 592 | } |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 593 | mp->m_sync_seq++; |
| 594 | wake_up(&mp->m_wait_single_sync_task); |
| 595 | } |
| 596 | |
| 597 | STATIC int |
| 598 | xfssyncd( |
| 599 | void *arg) |
| 600 | { |
| 601 | struct xfs_mount *mp = arg; |
| 602 | long timeleft; |
Dave Chinner | a8d770d | 2009-04-06 18:44:54 +0200 | [diff] [blame] | 603 | xfs_sync_work_t *work, *n; |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 604 | LIST_HEAD (tmp); |
| 605 | |
| 606 | set_freezable(); |
| 607 | timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); |
| 608 | for (;;) { |
| 609 | timeleft = schedule_timeout_interruptible(timeleft); |
| 610 | /* swsusp */ |
| 611 | try_to_freeze(); |
| 612 | if (kthread_should_stop() && list_empty(&mp->m_sync_list)) |
| 613 | break; |
| 614 | |
| 615 | spin_lock(&mp->m_sync_lock); |
| 616 | /* |
| 617 | * We can get woken by laptop mode, to do a sync - |
| 618 | * that's the (only!) case where the list would be |
| 619 | * empty with time remaining. |
| 620 | */ |
| 621 | if (!timeleft || list_empty(&mp->m_sync_list)) { |
| 622 | if (!timeleft) |
| 623 | timeleft = xfs_syncd_centisecs * |
| 624 | msecs_to_jiffies(10); |
| 625 | INIT_LIST_HEAD(&mp->m_sync_work.w_list); |
| 626 | list_add_tail(&mp->m_sync_work.w_list, |
| 627 | &mp->m_sync_list); |
| 628 | } |
| 629 | list_for_each_entry_safe(work, n, &mp->m_sync_list, w_list) |
| 630 | list_move(&work->w_list, &tmp); |
| 631 | spin_unlock(&mp->m_sync_lock); |
| 632 | |
| 633 | list_for_each_entry_safe(work, n, &tmp, w_list) { |
| 634 | (*work->w_syncer)(mp, work->w_data); |
| 635 | list_del(&work->w_list); |
| 636 | if (work == &mp->m_sync_work) |
| 637 | continue; |
Dave Chinner | e43afd7 | 2009-04-06 18:47:27 +0200 | [diff] [blame] | 638 | if (work->w_completion) |
| 639 | complete(work->w_completion); |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 640 | kmem_free(work); |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | return 0; |
| 645 | } |
| 646 | |
| 647 | int |
| 648 | xfs_syncd_init( |
| 649 | struct xfs_mount *mp) |
| 650 | { |
| 651 | mp->m_sync_work.w_syncer = xfs_sync_worker; |
| 652 | mp->m_sync_work.w_mount = mp; |
Dave Chinner | e43afd7 | 2009-04-06 18:47:27 +0200 | [diff] [blame] | 653 | mp->m_sync_work.w_completion = NULL; |
David Chinner | a167b17 | 2008-10-30 17:06:18 +1100 | [diff] [blame] | 654 | mp->m_sync_task = kthread_run(xfssyncd, mp, "xfssyncd"); |
| 655 | if (IS_ERR(mp->m_sync_task)) |
| 656 | return -PTR_ERR(mp->m_sync_task); |
| 657 | return 0; |
| 658 | } |
| 659 | |
| 660 | void |
| 661 | xfs_syncd_stop( |
| 662 | struct xfs_mount *mp) |
| 663 | { |
| 664 | kthread_stop(mp->m_sync_task); |
| 665 | } |
| 666 | |
Christoph Hellwig | 848ce8f | 2009-09-29 13:48:56 +0000 | [diff] [blame] | 667 | STATIC int |
David Chinner | 1dc3318 | 2008-10-30 17:37:15 +1100 | [diff] [blame] | 668 | xfs_reclaim_inode( |
David Chinner | fce08f2 | 2008-10-30 17:37:03 +1100 | [diff] [blame] | 669 | xfs_inode_t *ip, |
David Chinner | fce08f2 | 2008-10-30 17:37:03 +1100 | [diff] [blame] | 670 | int sync_mode) |
| 671 | { |
| 672 | xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino); |
| 673 | |
| 674 | /* The hash lock here protects a thread in xfs_iget_core from |
| 675 | * racing with us on linking the inode back with a vnode. |
| 676 | * Once we have the XFS_IRECLAIM flag set it will not touch |
| 677 | * us. |
| 678 | */ |
| 679 | write_lock(&pag->pag_ici_lock); |
| 680 | spin_lock(&ip->i_flags_lock); |
| 681 | if (__xfs_iflags_test(ip, XFS_IRECLAIM) || |
| 682 | !__xfs_iflags_test(ip, XFS_IRECLAIMABLE)) { |
| 683 | spin_unlock(&ip->i_flags_lock); |
| 684 | write_unlock(&pag->pag_ici_lock); |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 685 | return -EAGAIN; |
David Chinner | fce08f2 | 2008-10-30 17:37:03 +1100 | [diff] [blame] | 686 | } |
| 687 | __xfs_iflags_set(ip, XFS_IRECLAIM); |
| 688 | spin_unlock(&ip->i_flags_lock); |
| 689 | write_unlock(&pag->pag_ici_lock); |
| 690 | xfs_put_perag(ip->i_mount, pag); |
| 691 | |
| 692 | /* |
| 693 | * If the inode is still dirty, then flush it out. If the inode |
| 694 | * is not in the AIL, then it will be OK to flush it delwri as |
| 695 | * long as xfs_iflush() does not keep any references to the inode. |
| 696 | * We leave that decision up to xfs_iflush() since it has the |
| 697 | * knowledge of whether it's OK to simply do a delwri flush of |
| 698 | * the inode or whether we need to wait until the inode is |
| 699 | * pulled from the AIL. |
| 700 | * We get the flush lock regardless, though, just to make sure |
| 701 | * we don't free it while it is being flushed. |
| 702 | */ |
Christoph Hellwig | 848ce8f | 2009-09-29 13:48:56 +0000 | [diff] [blame] | 703 | xfs_ilock(ip, XFS_ILOCK_EXCL); |
| 704 | xfs_iflock(ip); |
David Chinner | fce08f2 | 2008-10-30 17:37:03 +1100 | [diff] [blame] | 705 | |
| 706 | /* |
| 707 | * In the case of a forced shutdown we rely on xfs_iflush() to |
| 708 | * wait for the inode to be unpinned before returning an error. |
| 709 | */ |
| 710 | if (!is_bad_inode(VFS_I(ip)) && xfs_iflush(ip, sync_mode) == 0) { |
| 711 | /* synchronize with xfs_iflush_done */ |
| 712 | xfs_iflock(ip); |
| 713 | xfs_ifunlock(ip); |
| 714 | } |
| 715 | |
| 716 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
| 717 | xfs_ireclaim(ip); |
| 718 | return 0; |
| 719 | } |
| 720 | |
Christoph Hellwig | bc990f5 | 2009-08-16 20:36:34 -0400 | [diff] [blame] | 721 | void |
| 722 | __xfs_inode_set_reclaim_tag( |
| 723 | struct xfs_perag *pag, |
| 724 | struct xfs_inode *ip) |
| 725 | { |
| 726 | radix_tree_tag_set(&pag->pag_ici_root, |
| 727 | XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino), |
| 728 | XFS_ICI_RECLAIM_TAG); |
| 729 | } |
| 730 | |
David Chinner | 1165451 | 2008-10-30 17:37:49 +1100 | [diff] [blame] | 731 | /* |
| 732 | * We set the inode flag atomically with the radix tree tag. |
| 733 | * Once we get tag lookups on the radix tree, this inode flag |
| 734 | * can go away. |
| 735 | */ |
David Chinner | 396beb8 | 2008-10-30 17:37:26 +1100 | [diff] [blame] | 736 | void |
| 737 | xfs_inode_set_reclaim_tag( |
| 738 | xfs_inode_t *ip) |
| 739 | { |
| 740 | xfs_mount_t *mp = ip->i_mount; |
| 741 | xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); |
| 742 | |
| 743 | read_lock(&pag->pag_ici_lock); |
| 744 | spin_lock(&ip->i_flags_lock); |
Christoph Hellwig | bc990f5 | 2009-08-16 20:36:34 -0400 | [diff] [blame] | 745 | __xfs_inode_set_reclaim_tag(pag, ip); |
David Chinner | 1165451 | 2008-10-30 17:37:49 +1100 | [diff] [blame] | 746 | __xfs_iflags_set(ip, XFS_IRECLAIMABLE); |
David Chinner | 396beb8 | 2008-10-30 17:37:26 +1100 | [diff] [blame] | 747 | spin_unlock(&ip->i_flags_lock); |
| 748 | read_unlock(&pag->pag_ici_lock); |
| 749 | xfs_put_perag(mp, pag); |
| 750 | } |
| 751 | |
| 752 | void |
| 753 | __xfs_inode_clear_reclaim_tag( |
| 754 | xfs_mount_t *mp, |
| 755 | xfs_perag_t *pag, |
| 756 | xfs_inode_t *ip) |
| 757 | { |
| 758 | radix_tree_tag_clear(&pag->pag_ici_root, |
| 759 | XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG); |
| 760 | } |
| 761 | |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 762 | STATIC int |
| 763 | xfs_reclaim_inode_now( |
| 764 | struct xfs_inode *ip, |
| 765 | struct xfs_perag *pag, |
| 766 | int flags) |
David Chinner | 7a3be02 | 2008-10-30 17:37:37 +1100 | [diff] [blame] | 767 | { |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 768 | /* ignore if already under reclaim */ |
| 769 | if (xfs_iflags_test(ip, XFS_IRECLAIM)) { |
David Chinner | 7a3be02 | 2008-10-30 17:37:37 +1100 | [diff] [blame] | 770 | read_unlock(&pag->pag_ici_lock); |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 771 | return 0; |
David Chinner | 7a3be02 | 2008-10-30 17:37:37 +1100 | [diff] [blame] | 772 | } |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 773 | read_unlock(&pag->pag_ici_lock); |
David Chinner | 7a3be02 | 2008-10-30 17:37:37 +1100 | [diff] [blame] | 774 | |
Christoph Hellwig | 848ce8f | 2009-09-29 13:48:56 +0000 | [diff] [blame] | 775 | return xfs_reclaim_inode(ip, flags); |
David Chinner | 7a3be02 | 2008-10-30 17:37:37 +1100 | [diff] [blame] | 776 | } |
| 777 | |
David Chinner | fce08f2 | 2008-10-30 17:37:03 +1100 | [diff] [blame] | 778 | int |
David Chinner | 1dc3318 | 2008-10-30 17:37:15 +1100 | [diff] [blame] | 779 | xfs_reclaim_inodes( |
David Chinner | fce08f2 | 2008-10-30 17:37:03 +1100 | [diff] [blame] | 780 | xfs_mount_t *mp, |
David Chinner | fce08f2 | 2008-10-30 17:37:03 +1100 | [diff] [blame] | 781 | int mode) |
| 782 | { |
Dave Chinner | 75f3cb1 | 2009-06-08 15:35:14 +0200 | [diff] [blame] | 783 | return xfs_inode_ag_iterator(mp, xfs_reclaim_inode_now, mode, |
| 784 | XFS_ICI_RECLAIM_TAG); |
David Chinner | fce08f2 | 2008-10-30 17:37:03 +1100 | [diff] [blame] | 785 | } |