From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7A60C48BD5 for ; Tue, 25 Jun 2019 22:50:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F0E720645 for ; Tue, 25 Jun 2019 22:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726455AbfFYWun (ORCPT ); Tue, 25 Jun 2019 18:50:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:45978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbfFYWum (ORCPT ); Tue, 25 Jun 2019 18:50:42 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15E042086D; Tue, 25 Jun 2019 22:50:40 +0000 (UTC) Date: Tue, 25 Jun 2019 18:50:39 -0400 From: Steven Rostedt To: Jeff Layton Cc: Geert Uytterhoeven , Andy Shevchenko , Linux Kernel Mailing List , ceph-devel , Ilya Dryomov , Zheng Yan , sage@redhat.com, agruenba@redhat.com, Joe Perches , Petr Mladek , Geert Uytterhoeven Subject: Re: [PATCH v2 0/3] ceph: don't NULL terminate virtual xattr values Message-ID: <20190625185039.08fa5a4f@gandalf.local.home> In-Reply-To: References: <20190619164528.31958-1-jlayton@kernel.org> <20190620102410.GT9224@smile.fi.intel.com> <7c12abe8a7e6cd3cfe9129a1e74d9c788ff2f1a9.camel@kernel.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Jun 2019 09:54:13 -0400 Jeff Layton wrote: > > snprintf() to a temporary buffer, and memcpy() to the final destination. > > These are all fairly small buffers (most are single integer values), > > so the overhead should be minimal, right? > > > > Yeah. I was trying to avoid having to deal with a second buffer, but > this is not a performance-critical codepath, so maybe that's the best > option. Yes, this looks like the better solution than adding a new library function for other people to (ab)use. -- Steve