From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS16276 91.121.0.0/16 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from nautica.notk.org (nautica.notk.org [91.121.71.147]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id AB9221F852 for ; Mon, 31 Jan 2022 03:34:23 +0000 (UTC) Received: by nautica.notk.org (Postfix, from userid 108) id 59FC4C01D; Mon, 31 Jan 2022 04:34:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1643600062; bh=XrhPF5A1lp/zlDCaC9rqw8lD4HDyo2CHFCVdJoi54gs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jbKBENrnrDanUo9zxB7VQ1cuFUii7GJwb6MCBG4hM7698Bmt2iQrSxGXOZQNS4u55 awp6BgSKaQv2+bpAbGOtypaKf11PMDzR4HhWBxqjPqY3188gJbG9iQzIzV9riETtNE TVJ0xh1bVYFPPe0rGrPRIwxNkBsjRe9TUuhvdjY3O4rqxRBP9u2AJI1Je+3q4VAeYI JeiCkylVpA+X/09cRNYlaAw6QmBibQgKML1ry5Rxk7qk/9k6Z8TxbpbwvnWwP+whZE hQWy6U+vti8TZ5vo0XZJ0do39SqV78D3GjxI0kjSa2S+hvCm9p0Y4iE9y67D12jXIu lg0apqEjgcA/w== Received: from odin.codewreck.org (localhost [127.0.0.1]) by nautica.notk.org (Postfix) with ESMTPS id E4D58C01B; Mon, 31 Jan 2022 04:34:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1643600061; bh=XrhPF5A1lp/zlDCaC9rqw8lD4HDyo2CHFCVdJoi54gs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u8PIyMGYbIn4zM6kED+rvlpNEP3TQh8u/pT5qYzHfNV98+FeKgTirKMc1Q+JNS8+C /225CoyK/HK24bJCyP4RKGcEu2+gVb2eE8NXqOeqeS2Ngt0r3aOvOFLxluUXgZYv8e WxUMD/2svZuXWCFxX5yBT91gXKFyeFt3LQPgR4Vy9/cj9KVuJlwSe2/zuFwwOwvhEB 85W/8N+KM4PB8U5L/XzvDsiiQrge4mDJwFVnh9gTKhRHmKHQE3z0bvt8wTf2kjlcxB XCvhLXgSNxC3aV2JVz9jrXRCKm4YrwZ6S786DbI8EscTi9/xUt6KgblKz25Mdw7gzZ bayEt+1Ats2Fg== Received: from localhost (odin.codewreck.org [local]) by odin.codewreck.org (OpenSMTPD) with ESMTPA id e3212bec; Mon, 31 Jan 2022 03:34:15 +0000 (UTC) Date: Mon, 31 Jan 2022 12:34:00 +0900 From: Dominique Martinet To: Eric Wong Cc: Julien Moutinho , meta@public-inbox.org Subject: Re: [PATCH] nodatacow: quiet chattr errors [was: Test failures with 1.7.0] Message-ID: References: <20211208010730.f47xxgzj53nwgvja@sourcephile.fr> <20211208040836.GA27368@dcvr> <20211208182247.M197857@dcvr> <20220130214908.M320944@dcvr> <20220131020311.M540193@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220131020311.M540193@dcvr> List-Id: Eric Wong wrote on Mon, Jan 31, 2022 at 02:03:11AM +0000: > Ah, intentionally setting BTRFS_TESTDIR to something that isn't > btrfs will break, yes. Ok, so this is specific to the test. Checking now nodatacow_fh skips files with non-btrfs magic, so it looks good to me! I've taken a look at the code now, just one more question: I don't understand why you've made the ioctl value depend on endianness ? get and set are respectively _IOR('f', 1, long) and _IOW('f', 2, long) which translate to (2 << 30) | (8 << 16) | ('f' << 8) | 1 (1 << 30) | (8 << 16) | ('f' << 8) | 2 so should be 0x80086601 0x40086602 regardless of endianness ? as far as I understand the memory representation might change but values themselves are handled the same, and I don't see anything in the defines that'd swap just the R/W bits around, but then again I don't have any big endian machine around and never really played with one. That aside the code looks good to me, if you do Reviewed-by tags feel free to add mine (Dominique Martinet ) once that question is answered. If you don't care, I don't care either :) > I suppose an explicit BAIL_OUT is in order, here: Well, tmpfs does not have attrs so lsattr fails and this triggers this bailout (this would also "work" for nixos tests which likely don't have lsattr available), but for example ext4 and xfs have working lsattr so we get another failure: ========= $ BTRFS_TESTDIR=/boot0/test strace -o /tmp/strace -f prove -bvw t/nodatacow.t t/nodatacow.t .. ok 1 - use PublicInbox::Syscall; not ok 2 - `C' attribute set on fd with pure Perl # Failed test '`C' attribute set on fd with pure Perl' # at t/nodatacow.t line 33. # '--------------e------- /boot0/test/nodatacow-80SC/pp.f # ' # doesn't match '(?^:C.*\/boot0\/test\/nodatacow\-80SC\/pp\.f)' not ok 3 - `C' attribute set on dir with pure Perl ========= But anyway, the test itself is skipped unless BTRFS_TESTDIR is set so this isn't really a problem, I've only tried because I'm a monkey :) Thanks again for the support, don't hesitate to ask if you need further info or tests for the zfs problems. -- Dominique