Skip to contentSkip to conversation

ceph: Add comments for ENOENT which returned from osd.

PATCH New majianpeng 1 participant 1 message Jul 26, 2013 Ceph client

lore
Share & tools
lore

majianpeng

author
#0 lore raw

PATCH 1/1 ceph: Add comments for ENOENT which returned from osd.

The error ENOENT from osd has special meaning.It means the data of read-area are all-zero.In order to reduce the flow between client and osd, it used this method.

---
 fs/ceph/file.c | 5 +++++
 1 file changed, 5 insertions(+)
fs/ceph/file.c +5 -0
index 2ddf061..81a9dfc 100644
@@ -342,6 +342,11 @@ more:
 				  ci->i_truncate_seq,
 				  ci->i_truncate_size,
 				  page_pos, pages_left, page_align);
+	/*
+	 * This error is return from osd.It means the read-area is allzero.
+	 * So in order to reduce the flow,it return this value the reciver
+	 * should fill zero.
+	 */
 	if (ret == -ENOENT)
 		ret = 0;
 	hit_stripe = this_len < left;
Signature · 4 lines
1.8.1.2

Thanks!
Jianpeng Ma