From patchwork Fri Aug 25 20:19:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88714C3DA66 for ; Fri, 25 Aug 2023 20:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231130AbjHYUUK (ORCPT ); Fri, 25 Aug 2023 16:20:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230382AbjHYUTk (ORCPT ); Fri, 25 Aug 2023 16:19:40 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20BDB1736 for ; Fri, 25 Aug 2023 13:19:39 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-4109c8ece5aso7899041cf.1 for ; Fri, 25 Aug 2023 13:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994778; x=1693599578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xEXFUFmf3inW/LN0OTx/vLWSMp4bAzU+io4MxvgVyuE=; b=ZY6AYuDpmtd1RXXfKTk7foBgKGaRyQrXGf3h/WA8S1BPL23UYscX7WKfcQchgLQ7ST tifgKHOWX5rhOs3NX3ysnEvJzaNwo5F4QgkXlLAt5JCWGCHSM8uek67l2hiQ7VGmpLTK 8ehoDuzqTHSo48BCEQgA/RJSCp9VCsxHo93bz8RJOiyt2PP1hTQ3b72HdVaEZ+NVzvzs JDb2SBFka7Cta15NGGXJOLGxf7PZC5CHK3DcoLVUflTe+ZAGEQkgmtFpqdGSD/3Mqmig J3DPyjlCCPBLdAOL2BerSzV9dEu6nOWL1eWV1ouOn7GUAnu/8RZbx2tHrIpUq2MMek1Q gyeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994778; x=1693599578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xEXFUFmf3inW/LN0OTx/vLWSMp4bAzU+io4MxvgVyuE=; b=Z3+P2zd6Ljh5ZXXQ+mNifsTKVvw/GKYF9uncmcRTih10es+6A9ooOEfxuQn0qUbOKQ b2iXZntque5J6/5hmB2mNFw4X+DQ8hF93Ij7fvyXzUbETqapxeq2yRTiqAX4jP/sV1vq g7CiW1PnLkLK30pV/jrgCeMY0YwQyhnEYWRyrgRHmTEAQP7n1xL814yrtDvedQaXw3ue 2piPDLxYItsIAngT6YbeND8+zsHNoKU9R569My+PQp+xAitfgE7Frbe3oqpZ54W1waGK VJ+9yHLhjYIEvIYcufb30jYLZfz3zwugjecY7kUuVz7mjmz3IIR1e8ZkFACBUhq9h5dN mecw== X-Gm-Message-State: AOJu0YxVSOjzSWXnV4FdwPITPKaBMY53ikpAvMPq4edU/7eHI5actEyV dROxgQIFvXkfocqQsJn5gD9UIiQ7E5mOsjk/MVw= X-Google-Smtp-Source: AGHT+IF8gSFrDa7vl2J5bMd1kMJ15NwfSjy4U+3Dq1di8uR/VhBvF7aUogosHoPqgFSmvt/qzXj8JA== X-Received: by 2002:a05:622a:1046:b0:410:8fcb:e966 with SMTP id f6-20020a05622a104600b004108fcbe966mr21579736qte.32.1692994778148; Fri, 25 Aug 2023 13:19:38 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id bp37-20020a05622a1ba500b004100c132990sm738694qtb.44.2023.08.25.13.19.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:37 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 01/12] btrfs: move btrfs_crc32c_final into free-space-cache.c Date: Fri, 25 Aug 2023 16:19:19 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org This is the only place this helper is used, take it out of ctree.h and move it into free-space-cache.c. Signed-off-by: Josef Bacik --- fs/btrfs/ctree.h | 5 ----- fs/btrfs/free-space-cache.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 9419f4e37a58..c80d9879d931 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -475,11 +475,6 @@ static inline u32 btrfs_crc32c(u32 crc, const void *address, unsigned length) return crc32c(crc, address, length); } -static inline void btrfs_crc32c_final(u32 crc, u8 *result) -{ - put_unaligned_le32(~crc, result); -} - static inline u64 btrfs_name_hash(const char *name, int len) { return crc32c((u32)~1, name, len); diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 27fad70451aa..759b92db35d7 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -57,6 +57,11 @@ static void bitmap_clear_bits(struct btrfs_free_space_ctl *ctl, struct btrfs_free_space *info, u64 offset, u64 bytes, bool update_stats); +static inline void btrfs_crc32c_final(u32 crc, u8 *result) +{ + put_unaligned_le32(~crc, result); +} + static void __btrfs_remove_free_space_cache(struct btrfs_free_space_ctl *ctl) { struct btrfs_free_space *info; From patchwork Fri Aug 25 20:19:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F219EE49AB for ; Fri, 25 Aug 2023 20:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231136AbjHYUUL (ORCPT ); Fri, 25 Aug 2023 16:20:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230387AbjHYUTn (ORCPT ); Fri, 25 Aug 2023 16:19:43 -0400 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FB86171A for ; Fri, 25 Aug 2023 13:19:40 -0700 (PDT) Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-649c6ea6e72so7781056d6.2 for ; Fri, 25 Aug 2023 13:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994779; x=1693599579; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WRjPotIUWEc4gJhIm2o/fQiRMm8MFzkSb3hRHYdvw3E=; b=KEhjPfodUs2KqE4WEHmGDWp5nuNTFqik/wk+XYwP/eOlZV4Op4YuqwJt4za+N7lYh5 7/65w4HSvg4xmJCq6URt26iGtYqKIk/WjBPHB1dmtdW/MKSI9BeeBMAbTntyp9RWAFI2 53A2X1QQ/wHtuNkg7uZSXJsgw6PVYhlN47ZLoG+ZIzYfLpdLXET+im3cEOVf2IhZrjDM L83RMUG+VWQHZY1Ev+fZxG9MD65e0tBwL1qRjmd4DNuqpqb3CqL9/XxWGNGl2gRFz+RS 0Z2xFAm4PfxgSnIKnQM+N2wjtRBS9BlPzJWrMtTdwSmvW6VmekCNI1Ht51Ta3t604ls+ 4DyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994779; x=1693599579; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WRjPotIUWEc4gJhIm2o/fQiRMm8MFzkSb3hRHYdvw3E=; b=JJ5Kni6oaf0S+W+W5R67OsDaTMFyhxAQ5Zv2capbYUHx9BJa++jQ6I2YtvdeW5aRVg 65UgvegIzCZiEzee/e9/eY69pN9O5biVRHGM17Z7ecNFIEokPN9c13qRZBjq4l6plk+Z KU0Kwa8spEqL6vGsOnQojsxX6raiJL4zalBbpNgJgOujO+LbXXu4a/xcUWSpxxZCbWNi 9teTnCE74EdjkxAEz+5Vg5x3PrEqQ65WHynGA5VpXDH/oGOLCMiAUuXohlMohhdCc9ev cxOW+2gfWXx8sqxerU968R3Ty+ZBnSYyWIQUcVDtzQu94Ac956WdYur/3OThQVtyN86z dpBA== X-Gm-Message-State: AOJu0YyEVIjoe9WshlZuftptyQ/mDEh1ZWiLsPLHOYP1211ZBrMTR8c+ /tb0vpjYfgj40ds6TdrzhgYPJZGClGNpDqdsLCU= X-Google-Smtp-Source: AGHT+IGxIBi3ocHDDfD7swZBNvPRVBwBDnjq6Ss8z5qO0FgTVvnFAo+79RpZm0Sc5mJXWvpJvX5Z0g== X-Received: by 2002:a0c:8ecc:0:b0:63d:651e:4133 with SMTP id y12-20020a0c8ecc000000b0063d651e4133mr18318952qvb.37.1692994779323; Fri, 25 Aug 2023 13:19:39 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id x3-20020a0cc503000000b0063642bcc5e4sm773839qvi.9.2023.08.25.13.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:39 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 02/12] btrfs: remove btrfs_crc32c wrapper Date: Fri, 25 Aug 2023 16:19:20 -0400 Message-ID: <8a7ac9267cb726add7fb8bec90eb1d50ddbd0b4f.1692994620.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org This simply sends the same arguments into crc32c(), and is just used in a few places. Remove this wrapper and directly call crc32c() in these instances. Signed-off-by: Josef Bacik --- fs/btrfs/ctree.h | 5 ----- fs/btrfs/extent-tree.c | 6 +++--- fs/btrfs/free-space-cache.c | 4 ++-- fs/btrfs/send.c | 6 +++--- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index c80d9879d931..bffee2ab5783 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -470,11 +470,6 @@ static inline u32 BTRFS_MAX_XATTR_SIZE(const struct btrfs_fs_info *info) #define BTRFS_BYTES_TO_BLKS(fs_info, bytes) \ ((bytes) >> (fs_info)->sectorsize_bits) -static inline u32 btrfs_crc32c(u32 crc, const void *address, unsigned length) -{ - return crc32c(crc, address, length); -} - static inline u64 btrfs_name_hash(const char *name, int len) { return crc32c((u32)~1, name, len); diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index f356f08b55cb..e4d337b78e76 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -399,11 +399,11 @@ u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset) __le64 lenum; lenum = cpu_to_le64(root_objectid); - high_crc = btrfs_crc32c(high_crc, &lenum, sizeof(lenum)); + high_crc = crc32c(high_crc, &lenum, sizeof(lenum)); lenum = cpu_to_le64(owner); - low_crc = btrfs_crc32c(low_crc, &lenum, sizeof(lenum)); + low_crc = crc32c(low_crc, &lenum, sizeof(lenum)); lenum = cpu_to_le64(offset); - low_crc = btrfs_crc32c(low_crc, &lenum, sizeof(lenum)); + low_crc = crc32c(low_crc, &lenum, sizeof(lenum)); return ((u64)high_crc << 31) ^ (u64)low_crc; } diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 759b92db35d7..dfeed8256c02 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -545,7 +545,7 @@ static void io_ctl_set_crc(struct btrfs_io_ctl *io_ctl, int index) if (index == 0) offset = sizeof(u32) * io_ctl->num_pages; - crc = btrfs_crc32c(crc, io_ctl->orig + offset, PAGE_SIZE - offset); + crc = crc32c(crc, io_ctl->orig + offset, PAGE_SIZE - offset); btrfs_crc32c_final(crc, (u8 *)&crc); io_ctl_unmap_page(io_ctl); tmp = page_address(io_ctl->pages[0]); @@ -567,7 +567,7 @@ static int io_ctl_check_crc(struct btrfs_io_ctl *io_ctl, int index) val = *tmp; io_ctl_map_page(io_ctl, 0); - crc = btrfs_crc32c(crc, io_ctl->orig + offset, PAGE_SIZE - offset); + crc = crc32c(crc, io_ctl->orig + offset, PAGE_SIZE - offset); btrfs_crc32c_final(crc, (u8 *)&crc); if (val != crc) { btrfs_err_rl(io_ctl->fs_info, diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 3a566150c531..3b929f0e8f04 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -796,7 +796,7 @@ static int send_cmd(struct send_ctx *sctx) put_unaligned_le32(sctx->send_size - sizeof(*hdr), &hdr->len); put_unaligned_le32(0, &hdr->crc); - crc = btrfs_crc32c(0, (unsigned char *)sctx->send_buf, sctx->send_size); + crc = crc32c(0, (unsigned char *)sctx->send_buf, sctx->send_size); put_unaligned_le32(crc, &hdr->crc); ret = write_buf(sctx->send_filp, sctx->send_buf, sctx->send_size, @@ -5669,8 +5669,8 @@ static int send_encoded_extent(struct send_ctx *sctx, struct btrfs_path *path, hdr = (struct btrfs_cmd_header *)sctx->send_buf; hdr->len = cpu_to_le32(sctx->send_size + disk_num_bytes - sizeof(*hdr)); hdr->crc = 0; - crc = btrfs_crc32c(0, sctx->send_buf, sctx->send_size); - crc = btrfs_crc32c(crc, sctx->send_buf + data_offset, disk_num_bytes); + crc = crc32c(0, sctx->send_buf, sctx->send_size); + crc = crc32c(crc, sctx->send_buf + data_offset, disk_num_bytes); hdr->crc = cpu_to_le32(crc); ret = write_buf(sctx->send_filp, sctx->send_buf, sctx->send_size, From patchwork Fri Aug 25 20:19:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366296 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1300EE49A5 for ; Fri, 25 Aug 2023 20:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231132AbjHYUUK (ORCPT ); Fri, 25 Aug 2023 16:20:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbjHYUTn (ORCPT ); Fri, 25 Aug 2023 16:19:43 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 637D4199E for ; Fri, 25 Aug 2023 13:19:41 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-4107e6fb0e8so7756311cf.3 for ; Fri, 25 Aug 2023 13:19:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994780; x=1693599580; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=gDWUkrG4DZaGLhaxDYtKpgkyNYU+vRB0+Q/6VSj1VwU=; b=rvyi480zBfpOzdMcrVgRAnt2rDXS+QEQOKb3keMCu44o8EiTTB9/mpQ+zycVOjFOn9 6mIJHOj1SxjSfVwGeAkg/APYn4fPJuRxxFVGUyotb5px0zTUOZdI53A15T8EDp8misMt bw5JkQra4qeUAXOj4iT07EoaD/tQbFZvVTDIRqm/x75KxGI9BVcj9uvR3ZKDSUExJznq gKfyj8pyFfYjTB0yffo/byimIO+YYr4SHQfKl+9ZPPuEz5aB6NwmPRO1wFJRuNuMo8LO 7HSJzeUgKlWn+V91wuvA3hM1hSo29gL2CBWYb9I5OmtxNJ4pLHHc/si6XawKrYVNYKga 6vNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994780; x=1693599580; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gDWUkrG4DZaGLhaxDYtKpgkyNYU+vRB0+Q/6VSj1VwU=; b=gf1zQ5zYVt12b7jgr+EPJfUdR18IQKupEa74X/gXGU2utZzjAwd7f2XgcnSFVyhx3K 52wtjPN0FI3FipuatNggP3J0wyQYDcJ0GmSq0GsqrcThwNrNt0S2k/5m7gVKY4uYqs9L wTjyev/wxPZFZuect9XwdXbWMPMeGKGHTLJFB1q41bQgqfTej4Gr9nlPvNfzkvB4mt8C qJ4J9iWLsku4beQLyrGRqiriBfeWstwBUqKu69ckIYGopk0PByT04tqkL46xI7c4HI2G T/HkO7fTljPzKWQri61sWWIKdbYLM8cCEJwFNyqYYT1jEGU2eiew5LMpPSF4O7Gpv7jW v4KA== X-Gm-Message-State: AOJu0YwrFNX4KAKJ47x3CGCt8MSk4i724P267iODqcWfmbGoPtx/YcZ4 Ke6Klr19bm/Pk/3EAZZAT32HiLyMPx1HX7197wE= X-Google-Smtp-Source: AGHT+IFfpujU1vtboQm7UAUqOzlNVGG/nL+ZM/Uj3xcrAYKyJTZDgwfQVFl44zyzSvLeN0+KPwrO6A== X-Received: by 2002:a05:622a:1001:b0:410:af94:6838 with SMTP id d1-20020a05622a100100b00410af946838mr9548818qte.2.1692994780428; Fri, 25 Aug 2023 13:19:40 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id c11-20020ac84e0b000000b004108d49f391sm734250qtw.48.2023.08.25.13.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:40 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 03/12] btrfs: move btrfs_extref_hash into inode-item.h Date: Fri, 25 Aug 2023 16:19:21 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Ideally this would be un-inlined, but that is a cleanup for later. For now move this into inode-item.h, which is where the extref code lives. Signed-off-by: Josef Bacik --- fs/btrfs/ctree.h | 9 --------- fs/btrfs/inode-item.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index bffee2ab5783..7b8e52fd6d99 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -475,15 +475,6 @@ static inline u64 btrfs_name_hash(const char *name, int len) return crc32c((u32)~1, name, len); } -/* - * Figure the key offset of an extended inode ref - */ -static inline u64 btrfs_extref_hash(u64 parent_objectid, const char *name, - int len) -{ - return (u64) crc32c(parent_objectid, name, len); -} - static inline gfp_t btrfs_alloc_write_mask(struct address_space *mapping) { return mapping_gfp_constraint(mapping, ~__GFP_FS); diff --git a/fs/btrfs/inode-item.h b/fs/btrfs/inode-item.h index ede43b6c6559..2ee425a08e63 100644 --- a/fs/btrfs/inode-item.h +++ b/fs/btrfs/inode-item.h @@ -107,4 +107,13 @@ struct btrfs_inode_extref *btrfs_find_name_in_ext_backref( struct extent_buffer *leaf, int slot, u64 ref_objectid, const struct fscrypt_str *name); +/* + * Figure the key offset of an extended inode ref + */ +static inline u64 btrfs_extref_hash(u64 parent_objectid, const char *name, + int len) +{ + return (u64) crc32c(parent_objectid, name, len); +} + #endif From patchwork Fri Aug 25 20:19:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366302 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3229AEE49B2 for ; Fri, 25 Aug 2023 20:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231137AbjHYUUL (ORCPT ); Fri, 25 Aug 2023 16:20:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230427AbjHYUTo (ORCPT ); Fri, 25 Aug 2023 16:19:44 -0400 Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A548D171A for ; Fri, 25 Aug 2023 13:19:42 -0700 (PDT) Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-44d38d91885so612367137.1 for ; Fri, 25 Aug 2023 13:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994781; x=1693599581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fMEeV/ktXkiABS8UCZO8ADnW+e6o4cXxjPtsuMt8T9w=; b=XZgkPpmjZfAqodNBWMinx9/VklwYLiurpotkHGvqKMLl60TK9ulYZ3WrxCYZT+bAFJ goaKxqVwAnVmK8Gh29le2F9P4GBTxMT8nLuMQIRp+auXGEjIMQSyD9YRE5MnhTf0T9RA bRlgc+SMZKPcZGdydBc017frWJ05+DdqZ+i7XEoav/JIBNhsOAINhAk/lo948UMklVLd cZrN/nMV/pJoIL9/wBmpuYzpkKSfFnCmcOTm6CSCWkJSii7ydhY5vIBpNqh3nvXY4EDB BLNTcHFU1itwWf1XFtTNGEmY9U1rvTKROkTgOS703qbnoBfjj3laO/s06EL8o6QyDCN+ 1pFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994781; x=1693599581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fMEeV/ktXkiABS8UCZO8ADnW+e6o4cXxjPtsuMt8T9w=; b=K4zfmmSSTk2WYWFsA41P3lJrGhMmhnVWQ0tdmwRJIXKhacYnk0SnFu/1FQA2Zlb/Ea NWaXJiO0X0wmZLdb1DEATywIGX0bOg/G7Z4gMiuoSS9aaq9a2yC5O/rd0CN7vHhRNSYb KMKlD0afGBYLt1ZUx1IuDbCNNW1ODeXcDVZjQ9c29HQlSIE5XzgMzs2fxMTwz4tqw8TJ 1M6DqHk/oJXBqCuoIAohXiAldSmB+MANfjcdBkNdz1C65Ka93/7O5zSslincp2VSwPCv E9gof6blfFRHtX89TBqpd6B9ny4lv8ZSLOPa/wh/7PtTjaiqPAQ8rmqqVkjyLIO4ljrA NBBQ== X-Gm-Message-State: AOJu0YzTU2ENIo/SoWSUt1atPKGX8NwCcw3dQ3uxuUxgFCGbaUWH4YKl eWsYLECcgVqiXqGTQkXYPsLsHbT8bpFa5g+GePo= X-Google-Smtp-Source: AGHT+IGK/DBacyXeoPVRsEyJEvjYN3desmWGvlCJGUtqB/YvCcD0EIWKPoNto8OPRLVe8mfgg562Vg== X-Received: by 2002:a05:6102:22d9:b0:44e:afcb:ef96 with SMTP id a25-20020a05610222d900b0044eafcbef96mr1563758vsh.13.1692994781673; Fri, 25 Aug 2023 13:19:41 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id m24-20020ae9e718000000b0076d4bb714afsm738648qka.50.2023.08.25.13.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:41 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 04/12] btrfs: move btrfs_name_hash to dir-item.h Date: Fri, 25 Aug 2023 16:19:22 -0400 Message-ID: <0739f7926fe01f0861a0f69da55f080fd7f464e4.1692994620.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org This is related to the name hashing for dir items, move it into dir-item.h. Signed-off-by: Josef Bacik --- fs/btrfs/ctree.h | 5 ----- fs/btrfs/dir-item.h | 5 +++++ fs/btrfs/props.c | 1 + fs/btrfs/tree-checker.c | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 7b8e52fd6d99..9c2e96b8711f 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -470,11 +470,6 @@ static inline u32 BTRFS_MAX_XATTR_SIZE(const struct btrfs_fs_info *info) #define BTRFS_BYTES_TO_BLKS(fs_info, bytes) \ ((bytes) >> (fs_info)->sectorsize_bits) -static inline u64 btrfs_name_hash(const char *name, int len) -{ - return crc32c((u32)~1, name, len); -} - static inline gfp_t btrfs_alloc_write_mask(struct address_space *mapping) { return mapping_gfp_constraint(mapping, ~__GFP_FS); diff --git a/fs/btrfs/dir-item.h b/fs/btrfs/dir-item.h index aab4b7cc7fa0..951b4dda46fe 100644 --- a/fs/btrfs/dir-item.h +++ b/fs/btrfs/dir-item.h @@ -39,4 +39,9 @@ struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_fs_info *fs_info, const char *name, int name_len); +static inline u64 btrfs_name_hash(const char *name, int len) +{ + return crc32c((u32)~1, name, len); +} + #endif diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c index 0755af0e53e3..f9bf591a0718 100644 --- a/fs/btrfs/props.c +++ b/fs/btrfs/props.c @@ -15,6 +15,7 @@ #include "fs.h" #include "accessors.h" #include "super.h" +#include "dir-item.h" #define BTRFS_PROP_HANDLERS_HT_BITS 8 static DEFINE_HASHTABLE(prop_handlers_ht, BTRFS_PROP_HANDLERS_HT_BITS); diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index ab08a0b01311..8ad92aa43924 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -29,6 +29,7 @@ #include "accessors.h" #include "file-item.h" #include "inode-item.h" +#include "dir-item.h" /* * Error message should follow the following format: From patchwork Fri Aug 25 20:19:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366298 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42970EE49B3 for ; Fri, 25 Aug 2023 20:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbjHYUUM (ORCPT ); Fri, 25 Aug 2023 16:20:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230443AbjHYUTq (ORCPT ); Fri, 25 Aug 2023 16:19:46 -0400 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFA4C171A for ; Fri, 25 Aug 2023 13:19:43 -0700 (PDT) Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-649921ec030so7684046d6.1 for ; Fri, 25 Aug 2023 13:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994783; x=1693599583; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PMcUOKqHe+PHMcuwbh3TXRzBI0wToWNfG4w5HBgGNA8=; b=FY9J1VfcD2hQqjz586+XsFXjbuiERJ0YEu7Vbwz3DvEtwarAVU9kVWweImDpEjqPYV ztcWRkJN8JOlHK35lN8wwVIfKnlrA2d2HtY2YeADqqESa9qWjcybyzRR/iZYN3yJFEtw OY7LBEdvRwKRZYZ8D8u0Ivgqq6xLNOOoeLnHYVdXW7+SQ3ueEQKLnSZryvS/iN07+Cqw zkZKrEFNAQLSDiIc0B3eqv+cPU/OAGUG18zTTJ4ME9+GNV9utUxCEXg9B91BbH05UoKR x7GLJm2ko/nypinik4NOlLG9jUG3r3N8/7YciBfOCAnI1ybrKRfatSv0RLVq7cNzkilL fMjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994783; x=1693599583; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PMcUOKqHe+PHMcuwbh3TXRzBI0wToWNfG4w5HBgGNA8=; b=e3bbk5RTw7y9RWwjH+J8QzizLoqxKurINh8BMUXyKuDZB6toOXzsZo+hR8DJ6QQFWR ACBOrYNW/qvRzkWa+XM1bxUiTpGnd/ikeiRE7yL9F6PE900pwqG0kQRBHP7w81Vnz6dT WzAKXZBJFCBQGe/NObamWAXvCN/gO0bOAYnn2nZ1s71W057oM6jgB689sGyytd8jHbZV BXRnITn8c8StiJYZTl829Zq0fTHRCz73qQziwxWNRMKwO4W2CliD2QibsYhbv3dDVQik 8AxtjkoHxxfuc6tNqsbCob9onj4fBGoNdX37hnl/5y1WulfTfIAj+etfZLw2bI7ZhZyd RAsw== X-Gm-Message-State: AOJu0Yz/ZMqgsksVG621cswIp7wc9vkb7Zp0paug8h4gxoE+uOokuWTD 5B1qm7KTTQGrSKIocidJLCq2LZr6USbopXuR1nY= X-Google-Smtp-Source: AGHT+IHAEgS7BESQd1rZKYO7Ui8xAfSyFD2cVhxl+IDnMQfVVuNw7RSqqRfyGj/7Am8q4RLRHh6f8g== X-Received: by 2002:a0c:dc12:0:b0:64b:fdf0:48a3 with SMTP id s18-20020a0cdc12000000b0064bfdf048a3mr20744925qvk.10.1692994782775; Fri, 25 Aug 2023 13:19:42 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id q26-20020a0c8b1a000000b0064733ac9a9dsm781757qva.122.2023.08.25.13.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:42 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 05/12] btrfs: include asm/unaligned.h in accessors.h Date: Fri, 25 Aug 2023 16:19:23 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org We use the unaligned helpers directly in accessors.h, add the include here. Signed-off-by: Josef Bacik --- fs/btrfs/accessors.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h index 8cfc8214109c..f958eccff477 100644 --- a/fs/btrfs/accessors.h +++ b/fs/btrfs/accessors.h @@ -4,6 +4,7 @@ #define BTRFS_ACCESSORS_H #include +#include struct btrfs_map_token { struct extent_buffer *eb; From patchwork Fri Aug 25 20:19:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ED77EE49A6 for ; Fri, 25 Aug 2023 20:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231140AbjHYUUM (ORCPT ); Fri, 25 Aug 2023 16:20:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbjHYUTr (ORCPT ); Fri, 25 Aug 2023 16:19:47 -0400 Received: from mail-vk1-xa2b.google.com (mail-vk1-xa2b.google.com [IPv6:2607:f8b0:4864:20::a2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ECDF19AC for ; Fri, 25 Aug 2023 13:19:45 -0700 (PDT) Received: by mail-vk1-xa2b.google.com with SMTP id 71dfb90a1353d-48d0bfd352eso618720e0c.2 for ; Fri, 25 Aug 2023 13:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994784; x=1693599584; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sC8vKC1MdrtQTH/KdS7qPHtYBd4gWs5JdzeemEzBpyc=; b=O1kw8SZ5trQNFLJ0jGTv1bHlnvwh3t7vEBO/o1WIMY6O/wOjubjZXVqV/offxDgPQj +stQsaYf5thuxy/mx8wMnco2zZo62qe1q7jH4claanqMLeem3Wyk8jl6vcVcgHrFV1h/ f+RqEvwNEpyJMnQqzbOZ/GQqrfS3fhSKFXTqSwOV3Z1KxYOw9yi3Bs4K5U0NlBFSYq6f cd9ZsfBQ4QCzP7g3n80EwYE1ErYzshkNDhCQbHOsWFXk7BPTWL2FS+gAic2bfMwTr8jq pzzgO3b3Vy2Yfqs71CJVFaoQu4XSAS6EHOEHxhr2PjnDOF3eXsK5+DWuZKmvrJLWisRn dWJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994784; x=1693599584; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sC8vKC1MdrtQTH/KdS7qPHtYBd4gWs5JdzeemEzBpyc=; b=IrFyg5kVJxApPJoX2FOD2ccO+wrqNkhrVSawIVe5QsqgBfGQA60Jc+j5a9C8gNEgAD 4QyS0LH2GN049J4ABdYnLCOU+jjkM/PgQkjI7pF/mokL2REkyVZoGuXEGBDoNX1GH03K ib8BAFCYFNZaXlGCKneVEmQyW5Vn1FuToX0CbX5egAFC8PYIVz5M4KiH3WKdKeiAuCts wkWgpcXU0hnv2v2Q/kRFDsttb40sf3R4X7l0jw3Hk3aa/yn/EYp9ge4WDIv1KQeujl54 u87KxYkf8b5a47/UrFO/JPDlwIEAC3f+jFlaFnK8O/TJ34szaEvxYlXGDEIoFffwgCKk wDNA== X-Gm-Message-State: AOJu0YxtWNLwwpvCSbOC9FA+rSBlzjb/OP2AMYAt/HZLwFPBAs3gKU+3 zAj0xxEpC5p82hT/lrHjrh6KuNlFJD9NpbDN4hY= X-Google-Smtp-Source: AGHT+IGMu8Id2/HFzNXPVXbQaupB9Adp+W1SL+F+56f9wcxFuVzUyZoFGScVZh3DQQK4NMCSvlBKow== X-Received: by 2002:a1f:4c85:0:b0:48c:fb34:cf92 with SMTP id z127-20020a1f4c85000000b0048cfb34cf92mr17857220vka.5.1692994784098; Fri, 25 Aug 2023 13:19:44 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id n5-20020ae9c305000000b0076ceb5eb309sm733583qkg.74.2023.08.25.13.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:43 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 06/12] btrfs: include linux/crc32c in dir-item and inode-item Date: Fri, 25 Aug 2023 16:19:24 -0400 Message-ID: <6dbf325458ee1c2fc45a66779fd5a277d4f39810.1692994620.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Now these are holding the crc32c wrappers, add the required include so that we have our necessary dependencies. Signed-off-by: Josef Bacik --- fs/btrfs/dir-item.h | 2 ++ fs/btrfs/inode-item.h | 1 + 2 files changed, 3 insertions(+) diff --git a/fs/btrfs/dir-item.h b/fs/btrfs/dir-item.h index 951b4dda46fe..5db2ea0dfd76 100644 --- a/fs/btrfs/dir-item.h +++ b/fs/btrfs/dir-item.h @@ -3,6 +3,8 @@ #ifndef BTRFS_DIR_ITEM_H #define BTRFS_DIR_ITEM_H +#include + int btrfs_check_dir_item_collision(struct btrfs_root *root, u64 dir, const struct fscrypt_str *name); int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, diff --git a/fs/btrfs/inode-item.h b/fs/btrfs/inode-item.h index 2ee425a08e63..63dfd227e7ce 100644 --- a/fs/btrfs/inode-item.h +++ b/fs/btrfs/inode-item.h @@ -4,6 +4,7 @@ #define BTRFS_INODE_ITEM_H #include +#include struct btrfs_trans_handle; struct btrfs_root; From patchwork Fri Aug 25 20:19:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366304 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A57BBEE49B5 for ; Fri, 25 Aug 2023 20:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231148AbjHYUUO (ORCPT ); Fri, 25 Aug 2023 16:20:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbjHYUTs (ORCPT ); Fri, 25 Aug 2023 16:19:48 -0400 Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E6A7171A for ; Fri, 25 Aug 2023 13:19:46 -0700 (PDT) Received: by mail-ua1-x929.google.com with SMTP id a1e0cc1a2514c-7a25071d633so508833241.0 for ; Fri, 25 Aug 2023 13:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994785; x=1693599585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KXhfugQ15ZQIBw/K62Nj9pa/gM6xIJGR9HpfEvZp4TU=; b=1BgUiMAJOBgZSiR+g2Sxu2xNO/jpoa4OatL8wb2pZcb5mzdIiKJidSIoQKe5TjMuOi TvdxQorJnhSke6vlqlDQIEFIvwPW1HJviJwQMy2arMc5YeRFrbBeAz0yV1EZSh1fVioG PuzJYrpvgV21sq3kYJfwMok3qx6mdkESvg1ci+mzBXd+QeCcIQ5o2AoVFgPDP1YlSCX2 mJgxgpPTwOVzIYUUxHM0kyYqv0WE9yS1j9y40sXCX91lFd4TmeotzLReRvGEfaXR7EOz GAMf032W2/59t65sQWwmeBBZCBe+W0FhKc+/Wb294QDLDJghNNohWKjgzaRaU6R8zgS1 tp0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994785; x=1693599585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KXhfugQ15ZQIBw/K62Nj9pa/gM6xIJGR9HpfEvZp4TU=; b=LVLzYLvFiEAOzCQONyp9iTJOLoyqHZ6ixPtUHcFO7tfgbTB9q9ijDam0DO1Y/GxrvR u6usRnDuY7TVYq6iID1yuHsYxpfHR4onsrLXDga0YT5reZpMaDFmG0osvhAjzVBgkdaw TvW7LZeXes1cVkzbGczT6meygVOHjvVRRobxVE2HrX6Mq2+ZiZielcS/FU6nvTvQuMXY ZgeEM9LE7FqffRA9TeHgSoBo72Jq7WOeK1QUTcLd2e1CJOg8Fyal1UE7x6+/m0BYDglE w3AF6uMnlpNqPtTAsdRjC2srXySkIqqiHIaXrDBcoQWHIVg8b+JatMXfalNOf6YhMNQo +CkQ== X-Gm-Message-State: AOJu0Yz7tRYyY16KOW+TDJkPL7eTSTKOxZ36SDfoLxyZGrunKWvrx5rg 8w7jrED/uC+PN65LZem0H2zewnao4vlauHM8v/c= X-Google-Smtp-Source: AGHT+IEOZeDnoINDN9+QU7XbKWE+CRvPTLQQ+PRvejOXP1GOsRYt+UqIYSYlaW1eWCevYGkf45YHnQ== X-Received: by 2002:a05:6102:2c9:b0:44d:3d41:2a03 with SMTP id h9-20020a05610202c900b0044d3d412a03mr17198975vsh.16.1692994785303; Fri, 25 Aug 2023 13:19:45 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id b10-20020a0ccd0a000000b0064f46c719fasm770330qvm.31.2023.08.25.13.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:45 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 07/12] btrfs: include linux/iomap.h in file.c Date: Fri, 25 Aug 2023 16:19:25 -0400 Message-ID: <1dc135f94f5432b2c2264eda691787a3300ebea6.1692994620.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org We use the iomap code in file.c, include it so we have our dependencies. Signed-off-by: Josef Bacik --- fs/btrfs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 6edad7b9a5d3..ee9621e622d0 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "ctree.h" #include "disk-io.h" #include "transaction.h" From patchwork Fri Aug 25 20:19:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366306 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36F26EE49B6 for ; Fri, 25 Aug 2023 20:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbjHYUUN (ORCPT ); Fri, 25 Aug 2023 16:20:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230507AbjHYUTt (ORCPT ); Fri, 25 Aug 2023 16:19:49 -0400 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E0A6171A for ; Fri, 25 Aug 2023 13:19:47 -0700 (PDT) Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-410af8f75d9so7654181cf.0 for ; Fri, 25 Aug 2023 13:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994786; x=1693599586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=359EXyjrgYnw0qy+pnTckUd50Ihk3THkdm2GNkP0MAk=; b=Uty/XYQgdc9QPn2h8RH0ncDbfhPsdyMnCXj6q0XlAaCDqvlf/q6QQlZMlc2IE/SGwT PQmgkdu3pLt1O85476QEu+F9yWQ75w1D44qn4pkdQYspUNMY0jxQl3O86Do7PbRG+NXk zyKHHUEMmsirxV/RAkZfoQsJ6konJd1HDiXwna9YMNT8t+6JOcxThjQOCWq6yCBNPJ5n RXO+d1wcsoJACU65zF4zW6wMabCt0LcquBCKpaj03bsTGbDXBwA6R1fMJdg+fc7e7Y25 uHCs9G5lYnOExfiFYUHooNHaACO2PvwLOvVvtFX+GzDUzo7XhMb1HfbZ1LtWvkB552na 7lOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994786; x=1693599586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=359EXyjrgYnw0qy+pnTckUd50Ihk3THkdm2GNkP0MAk=; b=KSrNt7bRE3KqVuwX91jn04XZda+zKxmWf9p7Z0czV0jzAkFjO3ptwJPhg2R5qsAiak 64spVm+/rngOyS9zZITgU8OT2hdXxVBpnhj0iRlsJxpElpMFbeRAR+67ohddCV3qiFLo egH3Y5/MWUuW3IF4N09g6CrfegbLOBSRtMkxzVowAgDBvoclmYij6X4xbCMxHpu0CBI8 1LBj/nH8l3bgkLkkgGuQ6gRQ+YdhM41CCqbFBsj2zFJuEWr/TKvkDilSbwHrzvbdp3+w D2uxSwgfkhuJFzKJ1Y7TJ1m3plfjjr3A+443JzHkWAArB+sZTMcXwPnbDYzAuA7Vd+qu YkFA== X-Gm-Message-State: AOJu0Yyys3YzaefH/oyllqLBniWGTeScoEE1fCTBEaTPt6f6yPn3phin plNE5jsB1uQJmKrPEqt3dOEEGUCs6QrR+iRMg/k= X-Google-Smtp-Source: AGHT+IGUmvhcuecxTcvCY5ekG0n/Tt4lP+CqXD9tBCv+EZmEhzA1NnyUvzXcl6ZPS4UM56/NP6i4XQ== X-Received: by 2002:a05:622a:3c7:b0:412:191c:ffa with SMTP id k7-20020a05622a03c700b00412191c0ffamr127664qtx.26.1692994786439; Fri, 25 Aug 2023 13:19:46 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id q5-20020ac87345000000b00400a99b8b38sm724813qtp.78.2023.08.25.13.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:46 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 08/12] btrfs: add fscrypt related dependencies to respective headers Date: Fri, 25 Aug 2023 16:19:26 -0400 Message-ID: <51e817ceddd3f694740c7fcc6f9dbe7f2d720fbe.1692994620.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org These headers have struct fscrypt_str as function arguments, so add struct fscrypt_str to the theader, and include linux/fscrypt.h in btrfs_inode.h as it also needs the definition of struct fscrypt_name for the new inode args. Signed-off-by: Josef Bacik --- fs/btrfs/btrfs_inode.h | 1 + fs/btrfs/dir-item.h | 2 ++ fs/btrfs/inode-item.h | 1 + fs/btrfs/root-tree.h | 2 ++ 4 files changed, 6 insertions(+) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index bda1fdbba666..bca97a6bb246 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -8,6 +8,7 @@ #include #include +#include #include "extent_map.h" #include "extent_io.h" #include "ordered-data.h" diff --git a/fs/btrfs/dir-item.h b/fs/btrfs/dir-item.h index 5db2ea0dfd76..e40a226373d7 100644 --- a/fs/btrfs/dir-item.h +++ b/fs/btrfs/dir-item.h @@ -5,6 +5,8 @@ #include +struct fscrypt_str; + int btrfs_check_dir_item_collision(struct btrfs_root *root, u64 dir, const struct fscrypt_str *name); int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, diff --git a/fs/btrfs/inode-item.h b/fs/btrfs/inode-item.h index 63dfd227e7ce..a4a142f1b5e3 100644 --- a/fs/btrfs/inode-item.h +++ b/fs/btrfs/inode-item.h @@ -13,6 +13,7 @@ struct btrfs_key; struct btrfs_inode_extref; struct btrfs_inode; struct extent_buffer; +struct fscrypt_str; /* * Return this if we need to call truncate_block for the last bit of the diff --git a/fs/btrfs/root-tree.h b/fs/btrfs/root-tree.h index cbbaca32126e..eb15768b9170 100644 --- a/fs/btrfs/root-tree.h +++ b/fs/btrfs/root-tree.h @@ -3,6 +3,8 @@ #ifndef BTRFS_ROOT_TREE_H #define BTRFS_ROOT_TREE_H +struct fscrypt_str; + int btrfs_subvolume_reserve_metadata(struct btrfs_root *root, struct btrfs_block_rsv *rsv, int nitems, bool use_global_rsv); From patchwork Fri Aug 25 20:19:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68005EE49B4 for ; Fri, 25 Aug 2023 20:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231151AbjHYUUP (ORCPT ); Fri, 25 Aug 2023 16:20:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230508AbjHYUTu (ORCPT ); Fri, 25 Aug 2023 16:19:50 -0400 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8822F171A for ; Fri, 25 Aug 2023 13:19:48 -0700 (PDT) Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6bda8559fddso963401a34.1 for ; Fri, 25 Aug 2023 13:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994788; x=1693599588; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=t6AEW6ge5cEyzzzVA9dkAUL4qwB1kcQfIvwbaN5wWw4=; b=UosHxHtJJhlVjt/4z/ToE3gGz0pvhEQcXcY27kYDqxn/54RvRnQModTKWQaP+ERGH6 ptAUUZulOM48B1lVjk4akmEiFPCNEKp7sVDWz5xiCC/1ybWFZ2lNKp5wslCakGz2qMx1 PedcDY9p1jvRnAJHrNTBixWURR1ODru8YbdfqT9l1gRKlLnK8/ux42WsT3qLTBZ4R5lU Mvfk252N+TiYP8k+/YjaYRRqd0L73FPniUG7xgQsgUr5GfCuMyaa8zQNOIv/OQBj8UNE S0puJOwLrO/Arzz43xhZJXMgN9eODwJQiuoW+dem3HudhCnJG1wVz4TqR83C9nAjj6t5 b1LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994788; x=1693599588; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t6AEW6ge5cEyzzzVA9dkAUL4qwB1kcQfIvwbaN5wWw4=; b=BP8BXC545Qfv2ZMlHuWZkjPUewPDzfueH+OVer32b5CXpXn24vYaep98ijaKeLnL4g sTLa3+bN3+DTLYkZUqrROrHnIADLUFyQgzqnIlSqm0QW2SxKnccecRxleVThVakiPA0V Z1YNf8+oSYtW5UtfYoIuSHa2lLvO2sSsFkRJkaVYaS1Eo7u2MmY2+AfySKQzcsHpbsoG /nNRHAZ8MJKZIT2bVETyvkAM7hlzBUmlTg/RY49n90YtMc3S5HUC30TRRTB6QU7zbnpx BdZZ4Mjk3s9gpnX8yvSenpZzupb6zl6Vwr4/hvkqfC3FPv1I9vssvS272ZMXID23tiwl 7KcA== X-Gm-Message-State: AOJu0Yxdn5saVqriFY2FFnYWlv6tZYS4+xtans3v19cW2uwbTzMJwI29 kBOdWDmlx+4G6z0PiHggJpxE84rG5Hlk674rwk8= X-Google-Smtp-Source: AGHT+IGs2DXZOins3JQtj5WFhqhuK3oMbr74WFEsFKwcWysDkfYBu/+q4uXqk/Wpb1ram+BlwgCL7Q== X-Received: by 2002:a05:6870:219e:b0:1bf:b00:acc5 with SMTP id l30-20020a056870219e00b001bf0b00acc5mr4084214oae.28.1692994787740; Fri, 25 Aug 2023 13:19:47 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id i20-20020a0cf394000000b005dd8b9345b4sm764333qvk.76.2023.08.25.13.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:47 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 09/12] btrfs: add btrfs_delayed_ref_head declaration to extent-tree.h Date: Fri, 25 Aug 2023 16:19:27 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org extent-tree.h uses btrfs_delayed_ref_head in a function argument but doesn't pull it's declaration from anywhere, add it to the top of the header. Signed-off-by: Josef Bacik --- fs/btrfs/extent-tree.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/extent-tree.h b/fs/btrfs/extent-tree.h index 88c249c37516..ab2016db17e8 100644 --- a/fs/btrfs/extent-tree.h +++ b/fs/btrfs/extent-tree.h @@ -7,6 +7,7 @@ #include "block-group.h" struct btrfs_free_cluster; +struct btrfs_delayed_ref_head; enum btrfs_extent_allocation_policy { BTRFS_EXTENT_ALLOC_CLUSTERED, From patchwork Fri Aug 25 20:19:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE1C5EE49B9 for ; Fri, 25 Aug 2023 20:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231156AbjHYUUP (ORCPT ); Fri, 25 Aug 2023 16:20:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230513AbjHYUTv (ORCPT ); Fri, 25 Aug 2023 16:19:51 -0400 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBEBD171A for ; Fri, 25 Aug 2023 13:19:49 -0700 (PDT) Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-4108f57db7fso6956161cf.1 for ; Fri, 25 Aug 2023 13:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994789; x=1693599589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DHBFOgE5uZyoUbpVEvQ3beNIaqF+ekj1i5xCHWJaTCQ=; b=SjJ48FfYJbg0j9PKJ2eIAqTKKi9RZ6VJf/2fZdoV5tfOBPNXIReSvhh7/OszgugNP3 K0f7c2f0wT7ybGkH8wlrJLDmMK9290+S0XTxdSvKGAr+RXlR/kQg+PaNTuT+DJ1KmPvN +icnyGTSSJ6oU4FsunYsDiG+fwjmtMMzOj78+KTMcd7jA5d1CfZn+luHQrrn92x5ZSIW DP1d6OKlFy0P3d7thQ7t83wV58Dd54lDpW4A6+FQ0z8+87LyE9NcUpmk8rPeKN+GAX56 9EUsiTy542qf5IUpbrBY5IP25BjwnGPm2bkVgBbkJIAJEHtK+rMqTtJw4SZ22u7dxyur PtCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994789; x=1693599589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DHBFOgE5uZyoUbpVEvQ3beNIaqF+ekj1i5xCHWJaTCQ=; b=az72C8PF2IrXQA624UOELu04cmuEhQGCwrkBEB4twHH5fM2ywzjicrym66bTWTi33L 3euCOrpigHVAH/Fpsj7wFPk2D3B1nxlUf6/G/QXYUn5fr087n8T+Tc/8JaaqEfaENfrE jIZJfqpTj3CgemzJ0vdnO4W2tgdJrZ1atioCt4bmErErkuKOoe91Z23BQrU1MT3baDAx i/kWAMzSvrWPhHhegMHRgWLYEqE8V/3R72LHyj+3tqn3XaBm7UyhMIpf7AgW+xeYhwNs s44uaOcJv5Flnz6Vok80wnfGMcbQvGsBmuiJvQR6r4SD1+RDyG4E+LqkwR3gTO81tt+m kiMg== X-Gm-Message-State: AOJu0YyH6n36Yy9q5qmlcyWoi4akIMpxUNjgeaYmChbxCGgCyre7qZ6q mtCGz/Kh+2PDTvo6onr/aND/C2TdMmRoiin+EQc= X-Google-Smtp-Source: AGHT+IEfSKnkoBarjn1OvtHvQfUs5f5DrweY5F35vC2wR/oFnvN7C3KOoBRWO35c5U+Up/dtTHUBYA== X-Received: by 2002:a05:622a:290:b0:410:9b45:d7f3 with SMTP id z16-20020a05622a029000b004109b45d7f3mr16183203qtw.36.1692994788939; Fri, 25 Aug 2023 13:19:48 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id c27-20020ac8009b000000b00407ffb2c24dsm733032qtg.63.2023.08.25.13.19.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:48 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 10/12] btrfs: include trace header in where necessary Date: Fri, 25 Aug 2023 16:19:28 -0400 Message-ID: <59f02409baa3a41239ff61c3cf4c62b2a26501b9.1692994620.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org If we no longer include the tracepoints from ctree.h we fail to compile because we have the dependency in some of the header files and source files. Add the include where we have these dependencies to allow us to remove the include from ctree.h. Signed-off-by: Josef Bacik --- fs/btrfs/async-thread.c | 1 + fs/btrfs/btrfs_inode.h | 1 + fs/btrfs/locking.c | 1 + fs/btrfs/space-info.h | 1 + 4 files changed, 4 insertions(+) diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index ce083e99ef68..714ca74b66bf 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "async-thread.h" #include "ctree.h" diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index bca97a6bb246..b675dc09845d 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -9,6 +9,7 @@ #include #include #include +#include #include "extent_map.h" #include "extent_io.h" #include "ordered-data.h" diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 7979449a58d6..79a125c0f4a2 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "misc.h" #include "ctree.h" #include "extent_io.h" diff --git a/fs/btrfs/space-info.h b/fs/btrfs/space-info.h index 0bb9d14e60a8..ac0ce83f1477 100644 --- a/fs/btrfs/space-info.h +++ b/fs/btrfs/space-info.h @@ -3,6 +3,7 @@ #ifndef BTRFS_SPACE_INFO_H #define BTRFS_SPACE_INFO_H +#include #include "volumes.h" /* From patchwork Fri Aug 25 20:19:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57728EE49AD for ; Fri, 25 Aug 2023 20:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231153AbjHYUUP (ORCPT ); Fri, 25 Aug 2023 16:20:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbjHYUTw (ORCPT ); Fri, 25 Aug 2023 16:19:52 -0400 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EC80171A for ; Fri, 25 Aug 2023 13:19:51 -0700 (PDT) Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-649921ec030so7684386d6.1 for ; Fri, 25 Aug 2023 13:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994790; x=1693599590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=U5L6DMLzwEjKWUeKNgbL85ptU94gBY2Q/w/oQ7tj62Q=; b=hM53uVeIcehOpK1q1gHNVFJNSL8BZgrpHCNZG9fmCE1XK04JH/7y+TigLcm48G74Qr EV+Q8wbzCt7mwYFVotAnDcv2RQVQbrvbv3TvuFS4P5t1cqVy0cz7MdN8LegRJFDnXlVx 5wSLrXGxDhGb9QYWvqoOqbs21kk0Yu5PWBpkoR4W9L+Ng1Y6R68MfE9uSixe/YzzlIpD d6vFh+n/lnSFPlvyiUK/FivzyDT44eCdV7PA1duSbjiFmMkEmWKMEBWHaZKoc3373BVT E6qLWT+gmTtUnQnoyC8e259/54gi2tP75lAm97WG2G3inz0oxxon21TY8ojn5ccb3UwW 4LAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994790; x=1693599590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U5L6DMLzwEjKWUeKNgbL85ptU94gBY2Q/w/oQ7tj62Q=; b=Xr/IGmvkYSVf3zpHZfNAb4gKqluKS3Ot/oBqzFJHVswbp1Rfhgmf2z3T91Genkdb8+ n32Rc0fiavBU+sevQRN2IzBr+JpeIxGwY1ntiDmeD16X8jv1YCki9ZhTtzFkPs72DDUW 5d9SWomowj80eTwKgRZ7i+PuHh+XEZqdFOnSAhDmkKez3tM5yKjmNpVo2i69SNoXWCVu Yejrtwh2m+BsIkBq5m1iR4GZ7xvufB2gQqsjysVqDCC4TFC2Ep0HARkWC1WVU/JhpLtu LiOwQTTdXxpnT8jLkkA3CKaMDemT3D4Npb3XOJDkm8T6cYq9/qz0CyEqPLYDuwlO0IXQ g2UA== X-Gm-Message-State: AOJu0YxkL5mUgTrp81Nf7AUiYxOR6ekw2bfGuKnum27dPyHUrDy4umEF nLwb7yJjOR8UQZ4oyu18mCla6sxbat+/MLek7dk= X-Google-Smtp-Source: AGHT+IG/RkGLzNa2hIkVvJVhEa6vAtCGH7/pFjya62he4GWQ1MB4dRWAxwPk/AWxidIPjxMc+rPRCw== X-Received: by 2002:a0c:f18e:0:b0:63d:d83:8808 with SMTP id m14-20020a0cf18e000000b0063d0d838808mr19840303qvl.63.1692994790126; Fri, 25 Aug 2023 13:19:50 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id b14-20020a05620a126e00b00767d4a3f4d9sm743802qkl.29.2023.08.25.13.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:49 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 11/12] btrfs: include linux/security.h in super.c Date: Fri, 25 Aug 2023 16:19:29 -0400 Message-ID: <35931e108a9ca6c610a62ed89b4befda4a0c96ee.1692994620.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org We use some of the security related code in here, include it in super.c so we can remove the include from ctree.h. Signed-off-by: Josef Bacik --- fs/btrfs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index cffdd6f7f8e8..0c215ca05c8a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "messages.h" #include "delayed-inode.h" #include "ctree.h" From patchwork Fri Aug 25 20:19:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13366307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDDC2EE49B7 for ; Fri, 25 Aug 2023 20:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231163AbjHYUUQ (ORCPT ); Fri, 25 Aug 2023 16:20:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231124AbjHYUTy (ORCPT ); Fri, 25 Aug 2023 16:19:54 -0400 Received: from mail-vk1-xa31.google.com (mail-vk1-xa31.google.com [IPv6:2607:f8b0:4864:20::a31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE19171A for ; Fri, 25 Aug 2023 13:19:52 -0700 (PDT) Received: by mail-vk1-xa31.google.com with SMTP id 71dfb90a1353d-48d10c504a8so522861e0c.2 for ; Fri, 25 Aug 2023 13:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20221208.gappssmtp.com; s=20221208; t=1692994791; x=1693599591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=elHUiU95JNtc+7/kD21797AHjWx8kuHextAOLQG/DnA=; b=iApJHq1X16IoMR29reArgkRWv4VMMU7P8c6N5tmK54s4RzvygXhg2Af2Wl7ll/zH9P OAiCN3aCwsEIaC2CtnjXqKCz6Bf/HNWr7x6K9O+2CLx7OdFYkCtHxKFn5acsBBbp2S7p 6gfcNAFqaGLuFzc4EQvUf/IhwcHTiUiUWyIT7+LzPWhozTbyFe6+UD/4S9ouUCWrlJgv 4ZINPV4+mzAddBmWpcQwyPfLq5XQEaZ3AC9bjAMhdOIZC47GyDLr/Fe2dnYahf9Zzyt3 m14l1deVgvoF0mSq3Uzl7w+cLFDe/MHfRg9mPo55d4HFj/PEEEzEgeorsrhWlhm+aMaT Qjrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692994791; x=1693599591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=elHUiU95JNtc+7/kD21797AHjWx8kuHextAOLQG/DnA=; b=CoLs52Hj5NUQNQWocDTYBp3kApcS53v1XqhJKi4VuE5CW2fIWN7eE6FImGgoyoAVe+ 71Q7zgeU6B+beNNkc/KFbPSIjpints8fdN+fWibk412qu8NvBqPRBYNnE12f51fY6o7A H8SReYc7IvvQnXhy6l7Gx5jw8lBztIFc8HIEtA8Mqon7chCxzyFrKm2Mkn9gySI503CC +/0UOwpk4boXz+kAXSK3fWH+TCsTasj1CT+09FaU31PMUcuDT/M1QRWXPS8lxIjpIsHP gkD5Z5imSJoGEXgkmS0dPLyeUZ2/YhGHEeKXqLCOJjHTGY+4eMEZ05gw3qZKzCiwz2Je FHMg== X-Gm-Message-State: AOJu0YxVfBJ2F4yLdLWFCoGgrFRW4iLruV4b8sYHwnTQbcpvvDVwj4CZ sVjd5nQWIPPU0M/+Sh3pojIRsVm4d7Kfl+fJCC0= X-Google-Smtp-Source: AGHT+IFMtYCB1E6T2HFFKQKWD7X3KpSEO2qbBvq/I3//I0Oo2SClk0fzqxgjZP/OyUZHea0c+vAOaA== X-Received: by 2002:a1f:c741:0:b0:48d:659:1029 with SMTP id x62-20020a1fc741000000b0048d06591029mr16547491vkf.3.1692994791370; Fri, 25 Aug 2023 13:19:51 -0700 (PDT) Received: from localhost (cpe-76-182-20-124.nc.res.rr.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id f23-20020a05620a12f700b0076ef0fb5050sm744301qkl.31.2023.08.25.13.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 13:19:51 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 12/12] btrfs: remove extraneous includes from ctree.h Date: Fri, 25 Aug 2023 16:19:30 -0400 Message-ID: <15d63abd06cb64b7edc83d033e65ca00a2bae3ba.1692994620.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org We don't need any of these includes in the ctree.h header file for the header file itself, remove them to clean up ctree.h a little bit. Signed-off-by: Josef Bacik --- fs/btrfs/ctree.h | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 9c2e96b8711f..da9e07bf76ea 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -6,36 +6,8 @@ #ifndef BTRFS_CTREE_H #define BTRFS_CTREE_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "extent-io-tree.h" -#include "extent_io.h" -#include "extent_map.h" -#include "async-thread.h" -#include "block-rsv.h" #include "locking.h" -#include "misc.h" #include "fs.h" struct btrfs_trans_handle;