From patchwork Tue Nov 7 02:54:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiubo Li X-Patchwork-Id: 13447743 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E445620FB for ; Tue, 7 Nov 2023 02:56:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UqQlfBFL" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B543111C for ; Mon, 6 Nov 2023 18:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699325803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qjzIbEqOaZZS41oxTtFkDXCIHELu+9FcmtLcrtPCrGs=; b=UqQlfBFLNqZ685IDR2475MJGx77Yu2yMJm/+ZbunA3BrGRqmVYVGAhlON96LQfXd2BjLIj JtP4E+ORa8TEGMgzEnii+U++74gy1jLFxhI/Y9Gt7mh59AipHXSHWMGccM/RXRnpZw/nBn VXW1S9G/pGvW7faZqAAHs+dxKxNbxx4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-449-fKvKDNJZMsqqkYgqGUtIdw-1; Mon, 06 Nov 2023 21:56:42 -0500 X-MC-Unique: fKvKDNJZMsqqkYgqGUtIdw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0B596821935; Tue, 7 Nov 2023 02:56:42 +0000 (UTC) Received: from li-a71a4dcc-35d1-11b2-a85c-951838863c8d.ibm.com.com (unknown [10.72.112.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AD45C1596F; Tue, 7 Nov 2023 02:56:36 +0000 (UTC) From: xiubli@redhat.com To: ceph-devel@vger.kernel.org Cc: idryomov@gmail.com, jlayton@kernel.org, vshankar@redhat.com, mchangir@redhat.com, Xiubo Li Subject: [PATCH 0/2] ceph: allocate a smaller extent map if possible Date: Tue, 7 Nov 2023 10:54:21 +0800 Message-ID: <20231107025423.302404-1-xiubli@redhat.com> Precedence: bulk X-Mailing-List: ceph-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 From: Xiubo Li For fscrypt case mostly we can predict the max count of the extent map, so try to allocate a smaller size instead. Xiubo Li (2): libceph: specify the sparse read extent count ceph: try to allocate a smaller extent map for sparse read fs/ceph/addr.c | 4 +++- fs/ceph/file.c | 8 ++++++-- fs/ceph/super.h | 14 ++++++++++++++ include/linux/ceph/osd_client.h | 6 ++++-- 4 files changed, 27 insertions(+), 5 deletions(-) Tested-by: Venky Shankar