From patchwork Mon Feb 3 18:23:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 3570411 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D9A299F2E9 for ; Mon, 3 Feb 2014 18:23:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CCD2201BA for ; Mon, 3 Feb 2014 18:23:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DD2A20160 for ; Mon, 3 Feb 2014 18:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753637AbaBCSXu (ORCPT ); Mon, 3 Feb 2014 13:23:50 -0500 Received: from cantor2.suse.de ([195.135.220.15]:37436 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753465AbaBCSXt (ORCPT ); Mon, 3 Feb 2014 13:23:49 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6A00CAAD1 for ; Mon, 3 Feb 2014 18:23:48 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 4B611DA876; Mon, 3 Feb 2014 19:23:48 +0100 (CET) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH 3/6] btrfs: send: squeeze bitfilelds in fs_path Date: Mon, 3 Feb 2014 19:23:47 +0100 Message-Id: <4d22a6e5765bed08ad03749246b0c57403648d56.1391447200.git.dsterba@suse.cz> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: References: Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 We know that buf_len is at most PATH_MAX, 4k, and can merge it with the reversed member. This saves 3 bytes in favor of inline_buf. Signed-off-by: David Sterba --- fs/btrfs/send.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index ea427624e842..cb12c2ec37dc 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -53,8 +53,8 @@ struct fs_path { char *end; char *buf; - int buf_len; - unsigned int reversed:1; + unsigned short buf_len:15; + unsigned short reversed:1; char inline_buf[]; }; char pad[PAGE_SIZE];