• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/xfs/linux-2.6/

Lines Matching defs:ioend

111  * the final hold on this ioend.
115 xfs_ioend_t *ioend)
117 if (atomic_dec_and_test(&ioend->io_remaining))
118 queue_work(xfsdatad_workqueue, &ioend->io_work);
122 * We're now finished for good with this ioend structure.
125 * up memory. Do not use the ioend after this.
129 xfs_ioend_t *ioend)
133 for (bh = ioend->io_buffer_head; bh; bh = next) {
135 bh->b_end_io(bh, !ioend->io_error);
137 if (unlikely(ioend->io_error))
138 vn_ioerror(ioend->io_vnode, ioend->io_error, __FILE__,__LINE__);
139 vn_iowake(ioend->io_vnode);
140 mempool_free(ioend, xfs_ioend_pool);
152 xfs_ioend_t *ioend)
158 ip = xfs_vtoi(ioend->io_vnode);
161 ASSERT(ioend->io_type != IOMAP_READ);
163 if (unlikely(ioend->io_error))
166 bsize = ioend->io_offset + ioend->io_size;
189 xfs_ioend_t *ioend =
192 xfs_setfilesize(ioend);
193 xfs_destroy_ioend(ioend);
203 xfs_ioend_t *ioend =
206 xfs_setfilesize(ioend);
207 xfs_destroy_ioend(ioend);
220 xfs_ioend_t *ioend =
222 bhv_vnode_t *vp = ioend->io_vnode;
223 xfs_off_t offset = ioend->io_offset;
224 size_t size = ioend->io_size;
226 if (likely(!ioend->io_error)) {
228 xfs_setfilesize(ioend);
230 xfs_destroy_ioend(ioend);
240 xfs_ioend_t *ioend =
243 xfs_destroy_ioend(ioend);
257 xfs_ioend_t *ioend;
259 ioend = mempool_alloc(xfs_ioend_pool, GFP_NOFS);
266 atomic_set(&ioend->io_remaining, 1);
267 ioend->io_error = 0;
268 ioend->io_list = NULL;
269 ioend->io_type = type;
270 ioend->io_vnode = vn_from_inode(inode);
271 ioend->io_buffer_head = NULL;
272 ioend->io_buffer_tail = NULL;
273 atomic_inc(&ioend->io_vnode->v_iocount);
274 ioend->io_offset = 0;
275 ioend->io_size = 0;
278 INIT_WORK(&ioend->io_work, xfs_end_bio_unwritten);
280 INIT_WORK(&ioend->io_work, xfs_end_bio_delalloc);
282 INIT_WORK(&ioend->io_work, xfs_end_bio_read);
284 INIT_WORK(&ioend->io_work, xfs_end_bio_written);
286 return ioend;
324 xfs_ioend_t *ioend = bio->bi_private;
330 ioend->io_error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? 0 : error;
337 xfs_finish_ioend(ioend);
343 xfs_ioend_t *ioend,
346 atomic_inc(&ioend->io_remaining);
348 bio->bi_private = ioend;
427 * The fix is two passes across the ioend list - one to start writeback on the
432 xfs_ioend_t *ioend)
434 xfs_ioend_t *head = ioend;
442 next = ioend->io_list;
443 for (bh = ioend->io_buffer_head; bh; bh = bh->b_private) {
446 } while ((ioend = next) != NULL);
449 ioend = head;
451 next = ioend->io_list;
454 for (bh = ioend->io_buffer_head; bh; bh = bh->b_private) {
460 xfs_submit_ioend_bio(ioend, bio);
465 xfs_submit_ioend_bio(ioend, bio);
472 xfs_submit_ioend_bio(ioend, bio);
473 xfs_finish_ioend(ioend);
474 } while ((ioend = next) != NULL);
484 xfs_ioend_t *ioend)
490 next = ioend->io_list;
491 bh = ioend->io_buffer_head;
498 vn_iowake(ioend->io_vnode);
499 mempool_free(ioend, xfs_ioend_pool);
500 } while ((ioend = next) != NULL);
505 * earlier buffers -- if so, we try to append to this ioend if we
506 * can, otherwise we finish off any current ioend and start another.
507 * Return true if we've finished the given ioend.
518 xfs_ioend_t *ioend = *result;
520 if (!ioend || need_ioend || type != ioend->io_type) {
523 ioend = xfs_alloc_ioend(inode, type);
524 ioend->io_offset = offset;
525 ioend->io_buffer_head = bh;
526 ioend->io_buffer_tail = bh;
528 previous->io_list = ioend;
529 *result = ioend;
531 ioend->io_buffer_tail->b_private = bh;
532 ioend->io_buffer_tail = bh;
536 ioend->io_size += bh->b_size;
918 xfs_ioend_t *ioend = NULL, *iohead = NULL;
983 * the iomap is actually still valid, but the ioend
1042 type, &ioend,
1083 &ioend, !iomap_valid);
1095 iohead = ioend;
1105 if (ioend && iomap_valid) {
1109 xfs_cluster_write(inode, page->index + 1, &iomap, &ioend,
1409 xfs_ioend_t *ioend = iocb->private;
1423 ioend->io_offset = offset;
1424 ioend->io_size = size;
1425 if (ioend->io_type == IOMAP_READ) {
1426 xfs_finish_ioend(ioend);
1428 xfs_finish_ioend(ioend);
1431 * A direct I/O write ioend starts it's life in unwritten
1436 INIT_WORK(&ioend->io_work, xfs_end_bio_written);
1437 xfs_finish_ioend(ioend);