From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [Patch 2/3] tabled: return correct owner in lists
Date: Sun, 3 Jan 2010 00:56:35 -0700 [thread overview]
Message-ID: <20100103005635.0a200fbc@redhat.com> (raw)
For some reason we were printing the user which were executing the
request instead of the owner of the key in question, even before the
changeove to obj_vitals.
Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>
---
server/bucket.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
commit 699fb8443f84b55c3cb6af471082527e177244da
Author: Master <zaitcev@niphredil.zaitcev.lan>
Date: Sun Jan 3 00:31:04 2010 -0700
Print the correct owner.
diff --git a/server/bucket.c b/server/bucket.c
index 690da79..300a8a6 100644
--- a/server/bucket.c
+++ b/server/bucket.c
@@ -817,6 +817,7 @@ struct obj_vitals {
uint64_t mtime;
struct db_obj_addr addr;
char md5[40];
+ char owner[65];
};
static bool bucket_list_iter(const char *key, struct obj_vitals *v,
@@ -1021,6 +1022,7 @@ static bool bucket_list_keys(struct client *cli, const char *user,
memset(&v, 0, sizeof(v));
strcpy(v.md5, obj->md5);
+ strncpy(v.owner, obj->owner, sizeof(v.owner)-1);
if (!(GUINT32_FROM_LE(obj->flags) & DB_OBJ_INLINE))
memcpy(&v.addr, &obj->d.a, sizeof(v.addr));
v.mtime = GUINT64_FROM_LE(obj->mtime);
@@ -1096,8 +1098,8 @@ static bool bucket_list_keys(struct client *cli, const char *user,
time2str(timestr, sizeof(timestr), vp->mtime / 1000000),
vp->md5,
(unsigned long long) vp->size,
- user,
- user);
+ vp->owner,
+ vp->owner);
content = g_list_append(content, s);
reply other threads:[~2010-01-03 7:56 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=20100103005635.0a200fbc@redhat.com \
--to=zaitcev@redhat.com \
--cc=hail-devel@vger.kernel.org \
--cc=jeff@garzik.org \
/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.