Lines Matching refs:resid
730 cursor->resid = min_t(size_t, length, data->bio_length); in ceph_msg_data_bio_cursor_init()
732 if (cursor->resid < it->iter.bi_size) in ceph_msg_data_bio_cursor_init()
733 it->iter.bi_size = cursor->resid; in ceph_msg_data_bio_cursor_init()
735 BUG_ON(cursor->resid < bio_iter_len(it->bio, it->iter)); in ceph_msg_data_bio_cursor_init()
756 BUG_ON(bytes > cursor->resid); in ceph_msg_data_bio_advance()
758 cursor->resid -= bytes; in ceph_msg_data_bio_advance()
761 if (!cursor->resid) in ceph_msg_data_bio_advance()
771 if (cursor->resid < it->iter.bi_size) in ceph_msg_data_bio_advance()
772 it->iter.bi_size = cursor->resid; in ceph_msg_data_bio_advance()
775 BUG_ON(cursor->resid < bio_iter_len(it->bio, it->iter)); in ceph_msg_data_bio_advance()
786 cursor->resid = min_t(size_t, length, data->bvec_pos.iter.bi_size); in ceph_msg_data_bvecs_cursor_init()
788 cursor->bvec_iter.bi_size = cursor->resid; in ceph_msg_data_bvecs_cursor_init()
790 BUG_ON(cursor->resid < bvec_iter_len(bvecs, cursor->bvec_iter)); in ceph_msg_data_bvecs_cursor_init()
811 BUG_ON(bytes > cursor->resid); in ceph_msg_data_bvecs_advance()
813 cursor->resid -= bytes; in ceph_msg_data_bvecs_advance()
816 if (!cursor->resid) in ceph_msg_data_bvecs_advance()
823 BUG_ON(cursor->resid < bvec_iter_len(bvecs, cursor->bvec_iter)); in ceph_msg_data_bvecs_advance()
842 cursor->resid = min(length, data->length); in ceph_msg_data_pages_cursor_init()
863 *length = min_t(size_t, cursor->resid, PAGE_SIZE - *page_offset); in ceph_msg_data_pages_next()
876 cursor->resid -= bytes; in ceph_msg_data_pages_advance()
881 if (!cursor->resid) in ceph_msg_data_pages_advance()
914 cursor->resid = min(length, pagelist->length); in ceph_msg_data_pagelist_cursor_init()
932 BUG_ON(cursor->offset + cursor->resid != pagelist->length); in ceph_msg_data_pagelist_next()
936 *length = min_t(size_t, cursor->resid, PAGE_SIZE - *page_offset); in ceph_msg_data_pagelist_next()
951 BUG_ON(cursor->offset + cursor->resid != pagelist->length); in ceph_msg_data_pagelist_advance()
956 cursor->resid -= bytes; in ceph_msg_data_pagelist_advance()
962 if (!cursor->resid) in ceph_msg_data_pagelist_advance()
980 cursor->resid = iov_iter_count(&cursor->iov_iter); in ceph_msg_data_iter_cursor_init()
1008 *length = min_t(size_t, len, cursor->resid); in ceph_msg_data_iter_next()
1015 BUG_ON(bytes > cursor->resid); in ceph_msg_data_iter_advance()
1016 cursor->resid -= bytes; in ceph_msg_data_iter_advance()
1025 return cursor->resid; in ceph_msg_data_iter_advance()
1117 BUG_ON(*length > cursor->resid); in ceph_msg_data_next()
1130 BUG_ON(bytes > cursor->resid); in ceph_msg_data_advance()
1156 if (!cursor->resid && cursor->total_resid) { in ceph_msg_data_advance()