All of lore.kernel.org
 help / color / mirror / Atom feed
From: majianpeng <majianpeng@gmail.com>
To: sage <sage@inktank.com>
Cc: ceph-devel <ceph-devel@vger.kernel.org>
Subject: [PATCH][TRIVIAL] ceph: Add comments for ENOENT which returned from osd.
Date: Fri, 26 Jul 2013 10:52:13 +0800	[thread overview]
Message-ID: <201307261052055540112@gmail.com> (raw)

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.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 fs/ceph/file.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 2ddf061..81a9dfc 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -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;
-- 
1.8.1.2

Thanks!
Jianpeng Ma

                 reply	other threads:[~2013-07-26  2:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201307261052055540112@gmail.com \
    --to=majianpeng@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sage@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.