* [parch] ceph: cleanup types in striped_read()
@ 2013-07-23 13:48 Dan Carpenter
2013-07-23 17:02 ` Alex Elder
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2013-07-23 13:48 UTC (permalink / raw)
To: Sage Weil; +Cc: ceph-devel, kernel-janitors
We pass in a u64 value for "len" and then immediately truncate away the
upper 32 bits.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 2ddf061..93e53c8 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [parch] ceph: cleanup types in striped_read()
2013-07-23 13:48 [parch] ceph: cleanup types in striped_read() Dan Carpenter
@ 2013-07-23 17:02 ` Alex Elder
2013-07-24 1:09 ` Sage Weil
0 siblings, 1 reply; 3+ messages in thread
From: Alex Elder @ 2013-07-23 17:02 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Sage Weil, ceph-devel, kernel-janitors
On 07/23/2013 08:48 AM, Dan Carpenter wrote:
> We pass in a u64 value for "len" and then immediately truncate away the
> upper 32 bits.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Looks good.
Reviewed-by: Alex Elder <alex.elder@linaro.org>
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index 2ddf061..93e53c8 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [parch] ceph: cleanup types in striped_read()
2013-07-23 17:02 ` Alex Elder
@ 2013-07-24 1:09 ` Sage Weil
0 siblings, 0 replies; 3+ messages in thread
From: Sage Weil @ 2013-07-24 1:09 UTC (permalink / raw)
To: Alex Elder; +Cc: Dan Carpenter, ceph-devel, kernel-janitors
Applied, thanks guys!
On Tue, 23 Jul 2013, Alex Elder wrote:
> On 07/23/2013 08:48 AM, Dan Carpenter wrote:
> > We pass in a u64 value for "len" and then immediately truncate away the
> > upper 32 bits.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Looks good.
>
> Reviewed-by: Alex Elder <alex.elder@linaro.org>
>
> > diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> > index 2ddf061..93e53c8 100644
> > --- a/fs/ceph/file.c
> > +++ b/fs/ceph/file.c
> > @@ -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 majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-24 1:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-23 13:48 [parch] ceph: cleanup types in striped_read() Dan Carpenter
2013-07-23 17:02 ` Alex Elder
2013-07-24 1:09 ` Sage Weil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox