* handle that here as well.
*/
if (dn->dn_maxblkid == 0) {
- int newsz = offset > dn->dn_datablksz ? 0 :
+ uint64_t newsz = offset > dn->dn_datablksz ? 0 :
MIN(size, dn->dn_datablksz - offset);
bzero((char *)buf + newsz, size - newsz);
size = newsz;
break;
for (i = 0; i < numbufs; i++) {
- int tocpy;
- int bufoff;
+ uint64_t tocpy;
+ int64_t bufoff;
dmu_buf_t *db = dbp[i];
ASSERT(size > 0);
bufoff = offset - db->db_offset;
- tocpy = (int)MIN(db->db_size - bufoff, size);
+ tocpy = MIN(db->db_size - bufoff, size);
- bcopy((char *)db->db_data + bufoff, buf, tocpy);
+ (void) memcpy(buf, (char *)db->db_data + bufoff, tocpy);
offset += tocpy;
size -= tocpy;
FALSE, FTAG, &numbufs, &dbp));
for (i = 0; i < numbufs; i++) {
- int tocpy;
- int bufoff;
+ uint64_t tocpy;
+ int64_t bufoff;
dmu_buf_t *db = dbp[i];
ASSERT(size > 0);
bufoff = offset - db->db_offset;
- tocpy = (int)MIN(db->db_size - bufoff, size);
+ tocpy = MIN(db->db_size - bufoff, size);
ASSERT(i == 0 || i == numbufs-1 || tocpy == db->db_size);
req_offset = 0;
for (i = 0; i < numbufs; i++) {
- int tocpy, didcpy, bufoff;
+ uint64_t tocpy;
+ int64_t bufoff;
+ int didcpy;
dmu_buf_t *db = dbp[i];
bufoff = offset - db->db_offset;
ASSERT3S(bufoff, >=, 0);
- tocpy = (int)MIN(db->db_size - bufoff, size);
+ tocpy = MIN(db->db_size - bufoff, size);
if (tocpy == 0)
break;
req_offset = 0;
for (i = 0; i < numbufs; i++) {
- int tocpy, didcpy, bufoff;
+ uint64_t tocpy;
+ int64_t bufoff;
+ int didcpy;
dmu_buf_t *db = dbp[i];
bufoff = offset - db->db_offset;
ASSERT3S(bufoff, >=, 0);
- tocpy = (int)MIN(db->db_size - bufoff, size);
+ tocpy = MIN(db->db_size - bufoff, size);
if (tocpy == 0)
break;
return (err);
for (i = 0; i < numbufs; i++) {
- int tocpy;
- int bufoff;
+ uint64_t tocpy;
+ int64_t bufoff;
dmu_buf_t *db = dbp[i];
ASSERT(size > 0);
bufoff = uio->uio_loffset - db->db_offset;
- tocpy = (int)MIN(db->db_size - bufoff, size);
+ tocpy = MIN(db->db_size - bufoff, size);
if (xuio) {
dmu_buf_impl_t *dbi = (dmu_buf_impl_t *)db;
return (err);
for (i = 0; i < numbufs; i++) {
- int tocpy;
- int bufoff;
+ uint64_t tocpy;
+ int64_t bufoff;
dmu_buf_t *db = dbp[i];
ASSERT(size > 0);
bufoff = uio->uio_loffset - db->db_offset;
- tocpy = (int)MIN(db->db_size - bufoff, size);
+ tocpy = MIN(db->db_size - bufoff, size);
ASSERT(i == 0 || i == numbufs-1 || tocpy == db->db_size);