Lines Matching refs:resid

725 	cursor->resid = min_t(size_t, length, data->bio_length);  in ceph_msg_data_bio_cursor_init()
727 if (cursor->resid < it->iter.bi_size) in ceph_msg_data_bio_cursor_init()
728 it->iter.bi_size = cursor->resid; in ceph_msg_data_bio_cursor_init()
730 BUG_ON(cursor->resid < bio_iter_len(it->bio, it->iter)); in ceph_msg_data_bio_cursor_init()
751 BUG_ON(bytes > cursor->resid); in ceph_msg_data_bio_advance()
753 cursor->resid -= bytes; in ceph_msg_data_bio_advance()
756 if (!cursor->resid) in ceph_msg_data_bio_advance()
766 if (cursor->resid < it->iter.bi_size) in ceph_msg_data_bio_advance()
767 it->iter.bi_size = cursor->resid; in ceph_msg_data_bio_advance()
770 BUG_ON(cursor->resid < bio_iter_len(it->bio, it->iter)); in ceph_msg_data_bio_advance()
781 cursor->resid = min_t(size_t, length, data->bvec_pos.iter.bi_size); in ceph_msg_data_bvecs_cursor_init()
783 cursor->bvec_iter.bi_size = cursor->resid; in ceph_msg_data_bvecs_cursor_init()
785 BUG_ON(cursor->resid < bvec_iter_len(bvecs, cursor->bvec_iter)); in ceph_msg_data_bvecs_cursor_init()
806 BUG_ON(bytes > cursor->resid); in ceph_msg_data_bvecs_advance()
808 cursor->resid -= bytes; in ceph_msg_data_bvecs_advance()
811 if (!cursor->resid) in ceph_msg_data_bvecs_advance()
818 BUG_ON(cursor->resid < bvec_iter_len(bvecs, cursor->bvec_iter)); in ceph_msg_data_bvecs_advance()
837 cursor->resid = min(length, data->length); in ceph_msg_data_pages_cursor_init()
858 *length = min_t(size_t, cursor->resid, PAGE_SIZE - *page_offset); in ceph_msg_data_pages_next()
871 cursor->resid -= bytes; in ceph_msg_data_pages_advance()
876 if (!cursor->resid) in ceph_msg_data_pages_advance()
909 cursor->resid = min(length, pagelist->length); in ceph_msg_data_pagelist_cursor_init()
927 BUG_ON(cursor->offset + cursor->resid != pagelist->length); in ceph_msg_data_pagelist_next()
931 *length = min_t(size_t, cursor->resid, PAGE_SIZE - *page_offset); in ceph_msg_data_pagelist_next()
946 BUG_ON(cursor->offset + cursor->resid != pagelist->length); in ceph_msg_data_pagelist_advance()
951 cursor->resid -= bytes; in ceph_msg_data_pagelist_advance()
957 if (!cursor->resid) in ceph_msg_data_pagelist_advance()
1049 BUG_ON(*length > cursor->resid); in ceph_msg_data_next()
1062 BUG_ON(bytes > cursor->resid); in ceph_msg_data_advance()
1085 if (!cursor->resid && cursor->total_resid) { in ceph_msg_data_advance()