From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10362 invoked from network); 7 Jul 2021 17:47:44 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 7 Jul 2021 17:47:44 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob0.topicbox.com (Postfix) with ESMTP id EDFE41E2F1 for ; Wed, 7 Jul 2021 13:47:42 -0400 (EDT) (envelope-from bounce.mMa488a88e1c7c138aa329464a.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id EA3622BEA0D3; Wed, 7 Jul 2021 13:47:42 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=quarantine policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:to:subject:in-reply-to:message-id :references:mime-version:content-type:from:list-help:list-id :list-post:list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1625680062; bh=KTSJuX/iDDcjQWLu ZYkP9DIabCivyaLBwS0mRJqBRyA=; b=tv/kHMnLI4w9H876Wm4AGraO/MFRbif+ Q4LfzzQISXpDkigtj10NG4uiWjZ8fu2ZxWB6f2Tu1OOMT75R8E5qcwcdffTgvnO/ C+8BtKnVO2SLMc71hRRweERye3RMHSwT7ruYNdRseG2DqaqoiMJFq/d2RoagKzhu 6QNNLffc8s4= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1625680062; b=iOKKRKJB/+QelnejWIloezX95zFjV2G+eHp59sEVt4B//kspgX CLtvwbcarTpyAbBvVCoZ+nPevrpYEUle7W3P0RsV9HWSS6TmqrS1O+CsNfUFoaVT m6gCuNyYKX4sr6ycG3HiGtdRvTHXzx3Bi/vdlrZdjXxSll3xShtStl+pQ= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=quarantine policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=none (No BIMI records found); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=quarantine policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; iprev=pass smtp.remote-ip=205.166.94.24 (mx.sdf.org); spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mx.sdf.org policy.ptr=mx.sdf.org; x-return-mx=pass header.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-return-mx=pass smtp.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=date:to :subject:in-reply-to:message-id:references:mime-version :content-type:from:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; bh=CxtAFj4aG89O9lFtZFJ9niqVGnWfWurnM0ZqvNCrIUQ=; b=TXUjzMRVcbyy 2k+2dp3ytrxZ7cTADhJXP2Bny/wBaScipYBrLER4r6c1HLfWu0qIFHplSCCbJ+Es O6lsHe4KvHPK+6mQ1bAUn6TOgKUcwd71U+infqsVhXiapwj6JTeMztue8uZhYDnm kNZoly4SvJwHSTBXJnwObDsihaXLMmY= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id A8ABA2C07A9F for <9fans@9fans.net>; Wed, 7 Jul 2021 13:47:32 -0400 (EDT) (envelope-from adr@SDF.ORG) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 7F75FEB5967; Wed, 7 Jul 2021 13:47:32 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1625680052; b=HT5YEWyom2PltMt+PQoo4UwSR7nTi3IOZF0dn6ERXxVCWdUGii mywFyKeBfS3Jptd87CO49gtuC6yt3xxGXLlLFSxNxyD1wrYeuFN4NxPuHkyQE4Xg km1CKm5puIHi85nJkedXKqu1p2dQtF22gO8sZgV+hiA4TqjVG3qSFxU2lCKzdOx0 R0bcSmZYGDjvCJ3Bxuz4x3WWp5kGMTnmuxipKNIJD/yRHJvOSMFYOG2wvGeqUg5U W86geJzF3N37t0pYtM5D472FNtHtTMLlXyBh7s6Uuz2LDZDvgdM8UNuk0Y3JHNE8 IOfNzB6e0HxbKH/JVO1stMmcOLdgfHjMabpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:in-reply-to:message-id :references:mime-version:content-type; s=arcseal; t=1625680052; bh=J+DSFHpHPwonNvrk8dmCPUzFxX9a9ddmxMLbOlG/bSY=; b=YHW0PfDMJHqe zPzpNO+XOdUUUxuBQ02eqwjCK2G0Uq6X5KOsFp13DQuX8ByTsopH2yXQ/S0DagZb KgOc3Lk5aUUoGJs+gkkHwh6iFffX5cQAO9EhelNruAQ+vjmeUTztH1hnUJ0ph3Qm 7PH4UbgE6cGq6qgEAzuckGYHwmWmQAtq1Ya9zsvbI9sbApSR0GiwpaI40Y22ZeA9 dx9XNsRQIDQc8nUbRzUq17yjoU3aoRKJa8hbYB3KP7OQU4IYPF2afD6WkaKZdM+d OgEchFhXiSnM5qVCBs6dDQ6nVZ9bD9eCP8gJSJK6KkZZ8ywTQX1YYnVi3V9Px9iv zVqD68q1Tw== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=none (No BIMI records found); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=quarantine policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; iprev=pass smtp.remote-ip=205.166.94.24 (mx.sdf.org); spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mx.sdf.org policy.ptr=mx.sdf.org; x-return-mx=pass header.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-return-mx=pass smtp.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvtddrtddvgddutddvucdltddurdegudehrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgf nhhsuhgsshgtrhhisggvpdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttd enucenucfjughrpeffhffvufgjkfhfgggtsehttdertddttddvnecuhfhrohhmpegrughr uceorggurhesufffhfdrqfftifeqnecuggftrfgrthhtvghrnhepueevtefgleffgeefue dvfeehkeduheehtefhjeekhfduteegjeefffeijeefgfevnecuffhomhgrihhnpehmrghi lhdqrghrtghhihhvvgdrtghomhenucfkphepvddthedrudeiiedrleegrddvgedpvddthe drudeiiedrleegrdduieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhn vghtpedvtdehrdduieeirdelgedrvdegpdhhvghlohepmhigrdhsughfrdhorhhgpdhmrg hilhhfrhhomhepoegrughrsefufffhrdfqtffiqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (sdf.org: 205.166.94.24 is authorized to use 'adr@SDF.ORG' in 'mfrom' identity (mechanism 'ip4:205.166.94.0/24' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="adr@SDF.ORG"; helo=mx.sdf.org; client-ip=205.166.94.24 Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Wed, 7 Jul 2021 13:47:32 -0400 (EDT) (envelope-from adr@SDF.ORG) Received: from sdf.org (IDENT:adr@sdf.org [205.166.94.16]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 167HlVpn000840 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for <9fans@9fans.net>; Wed, 7 Jul 2021 17:47:31 GMT Received: from localhost (adr@localhost) by sdf.org (8.15.2/8.12.8/Submit) with ESMTP id 167HlUpT021479 for <9fans@9fans.net>; Wed, 7 Jul 2021 17:47:31 GMT Date: Wed, 7 Jul 2021 17:47:30 +0000 (UTC) To: 9fans@9fans.net Subject: Re: [9fans] mkfs In-Reply-To: <61931DE5C7AAEE06877D7B57B15B95FE@felloff.net> Message-ID: <514244e5-a8d-e8e0-4558-89ecde5714c3@SDF.ORG> References: <61931DE5C7AAEE06877D7B57B15B95FE@felloff.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format="flowed" Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 6b0fe316-df4b-11eb-974a-f666c8ef8251 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZTJjNjdjNGJjNDg5ZmE1NC1NYTQ4OGE4OGUxYzdjMTM4YWEzMjk0?= =?UTF-8?B?NjRhPg==?= From: "adr via 9fans" <9fans@9fans.net> List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: quoted-printable List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Ma488a88e1c7c138aa329464a:1:LzDAi2mPg7pu6z8FTgfYG6rpIKSF9bBQWrS_6I0gorE On Mon, 5 Jul 2021, cinap_lenrek@felloff.net wrote: > thats what we did in 9front (just so you dont need to do it all > over again in case you commit to that approach). Maybe you are interested in this then. The default bsize and the "-8" thing is only for kfs as Erik Quanstrom noticed here (I miss this guy on the list...) https://www.mail-archive.com/9fans@9fans.net/msg31636.html I've experimented and in my case too 8192 is the best value. You don't need these variables any more: int sfd; int setuid; /* on Fs: set uid and gid? */ char *user; You can delete the assignments and the code related to options that use the= m. In your code, it seem that option '-a' can be used after '-d', I just reused the variable i like this: i =3D 0; ARGBEGIN{ case 'a': if(i =3D=3D 1) { fprint(2, "cannot use -a with -d\n"); usage(); } fskind =3D Archive; newroot =3D ""; Binits(&bout, 1, OWRITE, boutbuf, sizeof boutbuf); break; case 'd': if(fskind =3D=3D Archive) { fprint(2, "cannot use -d with -a\n"); usage(); } i =3D 1; fskind =3D Fs; newroot =3D ARGF(); break; I got frustrated with proto.c. The implementation doesn't much the description in proto(2) and the way recursion is exploited makes it hard to fix it. Instead of rethinking the implementation, the code has been extracted from mkfs.c and hacked to make it work when is needed. There are places like "lets put a '\' here and see what happens..." Files in the 4th field only work when the path matches the source path, not the namespace as said in the manual. You can't use files in the dest root directly as in 1 - - - /tmp/a/z/1 With the version using proto.c it works (only if the src is /!) but I don't know if it is for the changes I made, you can test it with yours. I don't like how the interface is done. I would prefer something simpler, for example call a function giving proto file, position on the proto file, a structure for the new file with its permissions, owner, etc, a place to store the source path and may be flags for operations where performance can be improved, like copying entire directories. This function could return the position of the next entry in the proto file. Functions to do common operations, like copying entire directories could be provided in disk.h. Sorry for the runt, adr. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Te2c67c4bc489fa54-Ma488a= 88e1c7c138aa329464a Delivery options: https://9fans.topicbox.com/groups/9fans/subscription