Lines Matching refs:bytes
751 size_t bytes) in ceph_msg_data_bio_advance() argument
756 BUG_ON(bytes > cursor->resid); in ceph_msg_data_bio_advance()
757 BUG_ON(bytes > bio_iter_len(it->bio, it->iter)); in ceph_msg_data_bio_advance()
758 cursor->resid -= bytes; in ceph_msg_data_bio_advance()
759 bio_advance_iter(it->bio, &it->iter, bytes); in ceph_msg_data_bio_advance()
764 if (!bytes || (it->iter.bi_size && it->iter.bi_bvec_done && in ceph_msg_data_bio_advance()
806 size_t bytes) in ceph_msg_data_bvecs_advance() argument
811 BUG_ON(bytes > cursor->resid); in ceph_msg_data_bvecs_advance()
812 BUG_ON(bytes > bvec_iter_len(bvecs, cursor->bvec_iter)); in ceph_msg_data_bvecs_advance()
813 cursor->resid -= bytes; in ceph_msg_data_bvecs_advance()
814 bvec_iter_advance(bvecs, &cursor->bvec_iter, bytes); in ceph_msg_data_bvecs_advance()
819 if (!bytes || (cursor->bvec_iter.bi_bvec_done && in ceph_msg_data_bvecs_advance()
868 size_t bytes) in ceph_msg_data_pages_advance() argument
872 BUG_ON(cursor->page_offset + bytes > PAGE_SIZE); in ceph_msg_data_pages_advance()
876 cursor->resid -= bytes; in ceph_msg_data_pages_advance()
877 cursor->page_offset = (cursor->page_offset + bytes) & ~PAGE_MASK; in ceph_msg_data_pages_advance()
878 if (!bytes || cursor->page_offset) in ceph_msg_data_pages_advance()
941 size_t bytes) in ceph_msg_data_pagelist_advance() argument
952 BUG_ON((cursor->offset & ~PAGE_MASK) + bytes > PAGE_SIZE); in ceph_msg_data_pagelist_advance()
956 cursor->resid -= bytes; in ceph_msg_data_pagelist_advance()
957 cursor->offset += bytes; in ceph_msg_data_pagelist_advance()
959 if (!bytes || cursor->offset & ~PAGE_MASK) in ceph_msg_data_pagelist_advance()
1013 size_t bytes) in ceph_msg_data_iter_advance() argument
1015 BUG_ON(bytes > cursor->resid); in ceph_msg_data_iter_advance()
1016 cursor->resid -= bytes; in ceph_msg_data_iter_advance()
1018 if (bytes < cursor->lastlen) { in ceph_msg_data_iter_advance()
1019 cursor->lastlen -= bytes; in ceph_msg_data_iter_advance()
1021 iov_iter_advance(&cursor->iov_iter, bytes - cursor->lastlen); in ceph_msg_data_iter_advance()
1126 void ceph_msg_data_advance(struct ceph_msg_data_cursor *cursor, size_t bytes) in ceph_msg_data_advance() argument
1130 BUG_ON(bytes > cursor->resid); in ceph_msg_data_advance()
1133 new_piece = ceph_msg_data_pagelist_advance(cursor, bytes); in ceph_msg_data_advance()
1136 new_piece = ceph_msg_data_pages_advance(cursor, bytes); in ceph_msg_data_advance()
1140 new_piece = ceph_msg_data_bio_advance(cursor, bytes); in ceph_msg_data_advance()
1144 new_piece = ceph_msg_data_bvecs_advance(cursor, bytes); in ceph_msg_data_advance()
1147 new_piece = ceph_msg_data_iter_advance(cursor, bytes); in ceph_msg_data_advance()
1154 cursor->total_resid -= bytes; in ceph_msg_data_advance()