From patchwork Sat Dec 28 13:59:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rnar_Ness?= X-Patchwork-Id: 3413951 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3A33DC02DC for ; Sat, 28 Dec 2013 13:59:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F87120125 for ; Sat, 28 Dec 2013 13:59:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0ED0320123 for ; Sat, 28 Dec 2013 13:59:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755436Ab3L1N7e (ORCPT ); Sat, 28 Dec 2013 08:59:34 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:35095 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755369Ab3L1N7e (ORCPT ); Sat, 28 Dec 2013 08:59:34 -0500 Received: by mail-wg0-f43.google.com with SMTP id k14so8988446wgh.22 for ; Sat, 28 Dec 2013 05:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=n5dGQMo25HTxqnziCpnlOfDR0gO9X/pzGvKswSJEvYo=; b=Pxinvd9kMRMUFvxvexW+kMlvCvgUeBAvXgsM2EWVTwLCW2fdF4RErj/277Rsdp8Mro Nk8yQl9MYAXUe5IbbqDrhCDgUqovLoHmuWgQsl3jO/pVjD6j2zwZZH+XV3mx35S18ch0 9QxXfvUkgP1/yW81On/gASKQ/Ov81irn3Ily2a9KZXPe3ZoR4y1RDtgdA5hJF5+5/sUG XZE5EYKPFlaQsqh9rEhx49I9L9cHhIG8a6Rtnv64O8HZrc7on6YU500pMX0LqlRYkKga Jc0oFeXLpIXnCcSzNUJoQD765cMAE2v+Xi3xTQJ9niECN647L0dOq/FwN0grBLP1QY3s c9FA== MIME-Version: 1.0 X-Received: by 10.180.189.106 with SMTP id gh10mr37652871wic.18.1388239172724; Sat, 28 Dec 2013 05:59:32 -0800 (PST) Received: by 10.216.124.1 with HTTP; Sat, 28 Dec 2013 05:59:32 -0800 (PST) Date: Sat, 28 Dec 2013 14:59:32 +0100 Message-ID: Subject: Patch for rados tool to allow listomapvals to list all k/v pairs From: =?ISO-8859-1?Q?Bj=F8rnar_Ness?= To: ceph-devel@vger.kernel.org Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, T_TVD_MIME_EPI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Current code only lists first 512 k/v pairs, attached patch. diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index a5a921c..bbd7ba2 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -1760,6 +1760,7 @@ static int rados_tool_common(const std::map < std::string, std << cpp_strerror(ret) << std::endl; return 1; } + ret = values.size(); for (map::const_iterator it = values.begin(); it != values.end(); ++it) { // dump key in hex if it contains nonprintable characters @@ -1771,6 +1772,7 @@ static int rados_tool_common(const std::map < std::string, std keybl.hexdump(cout); } else { cout << it->first; + last_read = it->first; } cout << std::endl; cout << "value: (" << it->second.length() << " bytes) :\n";