Ceph: allocate non-zero page to fscache in readpage()
Subsystems (2)
PATCH 1/1 Ceph: allocate non-zero page to fscache in readpage()
ceph_osdc_readpages() returns number of bytes read, currently, the code only allocate full-zero page into fscache, this patch fixes this.
Signed-off-by Li Wang <[email protected]>
--- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/addr.c +1 -1
@@ -216,7 +216,7 @@ static int readpage_nounlock(struct file *filp, struct page *page) }SetPageUptodate (page); -if (err ==0 ) +if (err >=0 )ceph_readpage_to_fscache (inode, page); out:
Signature · 1 line
1.7.9.5
Li, that's a good good catch.
Quoted 25 lines · Li Wang
ceph_osdc_readpages()returns number of bytes read, currently, the code only allocate full-zero page into fscache, this patch fixes this.Signed-off-by Li Wang <[email protected]>--- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ceph/addr.c +1
-2@@ -216,7 +216,7 @@ static int readpage_nounlock(struct file *filp, struct page *page) }SetPageUptodate (page); -if (err ==0 ) +if (err >=0 )ceph_readpage_to_fscache (inode, page); out: --1.7.9.5
Signature · 7 lines
Milosz Tanski CTO 10 East 53rd Street, 37th floor New York, NY 10022 p: 646-253-9055 e: [email protected]
Added to the testing branch.
Thanks!
Quoted 46 lines · Milosz Tanski
Li, that's a good good catch.
fs/ceph/addr.c static int readpage_nounlock(struct file *filp,
Quoted 14 lines · Li Wang
ceph_osdc_readpages()returns number of bytes read, currently, the code only allocate full-zero page into fscache, this patch fixes this.Signed-off-by Li Wang <[email protected]>--- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ceph/addr.c +0
-0@@ -216,7 +216,7 @@ static int readpage_nounlock(struct file *filp,struct page *page)
Quoted 11 lines
fs/ceph/addr.c +1
-2}SetPageUptodate (page); -if (err ==0 ) +if (err >=0 )ceph_readpage_to_fscache (inode, page); out: --1.7.9.5
Signature · 12 lines
Milosz Tanski CTO 10 East 53rd Street, 37th floor New York, NY 10022 p: 646-253-9055 e: [email protected] -- 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