ceph: cleanup types in striped_read()
Subsystems (2)
We pass in a u64 value for "len" and then immediately truncate away the upper 32 bits.
Signed-off-by Dan Carpenter <[email protected]>
fs/ceph/file.c +4 -4
@@ -313,9 +313,9 @@ static int striped_read(struct inode *inode, {struct ceph_fs_client *fsc =ceph_inode_to_client (inode);struct ceph_inode_info *ci =ceph_inode (inode); -u64 pos, this_len; +u64 pos, this_len, left;int io_align, page_align; -int left, pages_left; +int pages_left;int read;struct page **page_pos;int ret;
@@ -346,7 +346,7 @@ more: ret =0 ; hit_stripe = this_len < left; was_short = ret >=0 && ret < this_len; -dout ("striped_read %llu~%u (read %u) got %d%s%s\n" , pos, left, read, +dout ("striped_read %llu~%llu (read %u) got %d%s%s\n" , pos, left, read, ret, hit_stripe ?" HITSTRIPE" :"" , was_short ?" SHORT" :"" );if (ret >0 ) {
@@ -378,7 +378,7 @@ more:if (pos + left > inode->i_size) left = inode->i_size - pos; -dout ("zero tail %d\n" , left); +dout ("zero tail %llu\n" , left);ceph_zero_page_vector_range (page_align + read, left, pages); read += left;
Alex Elder
Reviewed-byQuoted 4 lines · Dan Carpenter
We pass in a u64 value for "len" and then immediately truncate away the upper 32 bits.
Signed-off-by Dan Carpenter <[email protected]>
Looks good.
Reviewed-by Alex Elder <[email protected]>
Quoted 39 lines
fs/ceph/file.c +4
-5@@ -313,9 +313,9 @@ static int striped_read(struct inode *inode, {struct ceph_fs_client *fsc =ceph_inode_to_client (inode);struct ceph_inode_info *ci =ceph_inode (inode); -u64 pos, this_len; +u64 pos, this_len, left;int io_align, page_align; -int left, pages_left; +int pages_left;int read;struct page **page_pos;int ret;@@ -346,7 +346,7 @@ more: ret =0 ; hit_stripe = this_len < left; was_short = ret >=0 && ret < this_len; -dout ("striped_read %llu~%u (read %u) got %d%s%s\n" , pos, left, read, +dout ("striped_read %llu~%llu (read %u) got %d%s%s\n" , pos, left, read, ret, hit_stripe ?" HITSTRIPE" :"" , was_short ?" SHORT" :"" );if (ret >0 ) {@@ -378,7 +378,7 @@ more:if (pos + left > inode->i_size) left = inode->i_size - pos; -dout ("zero tail %d\n" , left); +dout ("zero tail %llu\n" , left);ceph_zero_page_vector_range (page_align + read, left, pages); read += left; --To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Sage Weil
AppliedApplied, thanks guys!
Quoted 51 lines · Alex Elder
Quoted 4 lines · Dan Carpenter
We pass in a u64 value for "len" and then immediately truncate away the upper 32 bits.
Signed-off-by Dan Carpenter <[email protected]>Looks good.
Reviewed-by Alex Elder <[email protected]>Quoted 39 lines
fs/ceph/file.c +4
-5@@ -313,9 +313,9 @@ static int striped_read(struct inode *inode, {struct ceph_fs_client *fsc =ceph_inode_to_client (inode);struct ceph_inode_info *ci =ceph_inode (inode); -u64 pos, this_len; +u64 pos, this_len, left;int io_align, page_align; -int left, pages_left; +int pages_left;int read;struct page **page_pos;int ret;@@ -346,7 +346,7 @@ more: ret =0 ; hit_stripe = this_len < left; was_short = ret >=0 && ret < this_len; -dout ("striped_read %llu~%u (read %u) got %d%s%s\n" , pos, left, read, +dout ("striped_read %llu~%llu (read %u) got %d%s%s\n" , pos, left, read, ret, hit_stripe ?" HITSTRIPE" :"" , was_short ?" SHORT" :"" );if (ret >0 ) {@@ -378,7 +378,7 @@ more:if (pos + left > inode->i_size) left = inode->i_size - pos; -dout ("zero tail %d\n" , left); +dout ("zero tail %llu\n" , left);ceph_zero_page_vector_range (page_align + read, left, pages); read += left; --To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html