From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7149079772069363712 X-Received: by 2002:a17:90b:2644:b0:205:d6be:b185 with SMTP id pa4-20020a17090b264400b00205d6beb185mr20820402pjb.127.1664536158641; Fri, 30 Sep 2022 04:09:18 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:358:b0:205:f03e:947a with SMTP id 24-20020a17090a035800b00205f03e947als2281577pjf.0.-pod-preprod-gmail; Fri, 30 Sep 2022 04:09:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74H4CtTy/o2Iyi530QhRnj0QnL5OzeLrs0FmGbTeMb/qu5M7jfH7OqZ29CFoqui68FxPRY X-Received: by 2002:a17:903:11c8:b0:179:de93:bd7e with SMTP id q8-20020a17090311c800b00179de93bd7emr8346590plh.95.1664536157716; Fri, 30 Sep 2022 04:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664536157; cv=none; d=google.com; s=arc-20160816; b=o5tZdOBxprjUV/Rrtd0qMFNw0gF7SlBYLmJHx84JT0TWn06/+0QDZkoei2h/lNhVoT jTrpSXFYyf9u+qFBaGzW4UKzEHJiaohJCgBRpIM7DzvHWVHOtLN+atXClqElJ0TdLKGL 2Siay4h7nrMAS77PA+9iYOf645R2A44P3luncTXQH6gNKYUMovjJ1POhmnOCzKAfeMXd CnwtDYQVjy/BSSb8tM1gzxpr+9x5+uP0IauiTX1ocIpklVp41Y3pHNJ2SRfZkF4nSLvh t6hX+v8NODwXQe0+PYSIhjXIMBYPPrHL6LAtJskJyQ2h+EN8N9q8ZYUHQJ5V2G4IkBGE nnnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=gFysHrgUkq7dnrD3Kxs3XUAp+bOdnvy8ETeK9TSZsOo=; b=IjxYATtKOTT37xhPLSsCrfaROXw0Go/8Gzbo6/W6hsGa2TFxqL2IKh3BnumWfGcviA SJbU9ZFVWiFhPe+LKVLHdsX4g01+/YFfQp3VCARix0q9nTmRmiOjzII7GpYK6O4IkbeV oGICm+Hn7+eIUCfmpxDvfOBs9JFsN3Dq4W38VyOMlYNSn3t7iydl9LlY9lN6rnfuXvwy Q4yqHBaW6WstZXhd5dGGIKLYV6zOYp6kZbd5bftscAC6ZkC+dO/qkY4c5iKiZJIKYCly YaK9AIIzQ4PQIitEVP0Efx1RLMi7XOP+blE09A+tfJnlJhPngNsDxkJ3p92S+AF7OOHz 3Itg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mQBqdIvm; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::d2a as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com. [2607:f8b0:4864:20::d2a]) by gmr-mx.google.com with ESMTPS id q18-20020a17090311d200b00176d0b3d584si93141plh.11.2022.09.30.04.09.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 04:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::d2a as permitted sender) client-ip=2607:f8b0:4864:20::d2a; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mQBqdIvm; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::d2a as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-io1-xd2a.google.com with SMTP id n192so2983732iod.3 for ; Fri, 30 Sep 2022 04:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=gFysHrgUkq7dnrD3Kxs3XUAp+bOdnvy8ETeK9TSZsOo=; b=mQBqdIvm3Rs2J4BxPuLaOEjdR87vrCkXBy7KymUCDGExVmuhWvKB/midzSyRiULZBE wKgeUeFlQwCntoSLuDgZjr9Y0QZB36LqJ9l6iSEAJMGGraxk8S5TCZIeXMVDk6Xy+C11 AnxOEx4MzNYODTqYXzqmLaSgiTPzrIjfeuBNiamanQ/g74A7cmflji3W7GclvQbSZIo5 34/kioXiHBLy2dPcAlolkcEYajZxEl6d0SIq80n7I9pbzpR00ztPyfTUNRe4plBPRoi9 tM4dhVe71c8Lkuxf00ewzF7tcYGWcrWAqvkVqNhbf17F7935bOw4ZAYwk84mq9pvVXuE F52w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=gFysHrgUkq7dnrD3Kxs3XUAp+bOdnvy8ETeK9TSZsOo=; b=D64Y6CGXpn3e8gqOwkQmnk9TL01uXim+nTmkozxdOE/j+/KAu5sZkzHa6rSaFhjuik MH/SpeoITqwyjG2hWTh3jJv24j90E5RD3O4jtRYDT1VnSZboFkjvKeZxeYVVdap3b7AL U6/SLFYjNRSFWvIIK5+oipFqsH/GXyRBC1yJ2gLhfvzBkUzq+gi1qW9r2wn0shhc/gEy 7JU851CQyAYnYDfyIIblSsMxadY7WjGSnVSO/mb2KURHSSO2CkrH+H6GIWOq2lEyh6+i t0PoHswPnCzpIWspAb7iyv6uPl9PiMa7Sy2+Lra509+wMks7WRT7Q2oA0FWXwvyeYWeF tVIQ== X-Gm-Message-State: ACrzQf35WVr8Il05aMDA+v0uZJ+M3ECyTW55+q0PQUGzUXZNC+jYjt1r AzqRzJlzX+4xKhCEpQG9b1LgDzDqV6U9WTOc3Vu1EwwQ4w== X-Received: by 2002:a05:6638:120b:b0:35a:98f1:7a22 with SMTP id n11-20020a056638120b00b0035a98f17a22mr4490843jas.271.1664536157039; Fri, 30 Sep 2022 04:09:17 -0700 (PDT) MIME-Version: 1.0 References: <37b7c077-3d07-ab97-a9f8-a0e31bc85168@siemens.com> <7173fe9ca22bb8f50ba6c941fb62b1799f066e5d.camel@siemens.com> <3c13095fd15b6077e9b13b518ea7f25778a7c427.camel@siemens.com> In-Reply-To: <3c13095fd15b6077e9b13b518ea7f25778a7c427.camel@siemens.com> From: "Roberto A. Foglietta" Date: Fri, 30 Sep 2022 13:09:05 +0200 Message-ID: Subject: Re: [PATCH 1/1] expand last partition supports btrfs (inline test) To: "Bezdeka, Florian" Cc: "Schmidl, Tobias" , isar-users@googlegroups.com, Jan Kiszka Content-Type: multipart/alternative; boundary="0000000000005b34a105e9e306f3" X-TUID: RbgF1sCof0RV --0000000000005b34a105e9e306f3 Content-Type: text/plain; charset="UTF-8" Il Ven 30 Set 2022, 12:50 Bezdeka, Florian ha scritto: > On Fri, 2022-09-30 at 12:39 +0200, Roberto A. Foglietta wrote: > > > > > as you can see my approach is straight simple: if extending the ext4 > > fails because it does not match the filesystem type then try with > > btrfs tool. Obviously, the btrfs tool is added as dependencies among > > others before defined. > > First: resize2fs does not only support ext4. It supports all of the ext > variants (ext2-ext4) to my understanding. > The man resize2fs said so: ext2/3/4. Due to the implementation of ext4 and ext2 with the backcompatibility of some features, the resize supported in ext4 is also supported in ext2 because it is a basic feature. Viceversa, a tool that resize ext2 will fail to resize ext4 much probably because the journal. Second: There might be more reasons why resize2fs could fail. IMHO, it > doesn't make sense to run a btrfs tool on a ext filesystem that failed > to expand. > It is not elegant but it does not hurt to run btrfs on ext4 or resize2fs on btrfs. Yes, I am a raw penguin! LOL Third: The mount point (/tmp/btrfs) is never cleaned up in the Robertos > patch. > I do umount but NOT rmdir because if for some reason umount fails (expecially in combination with a bug that do not let the error code be returned, I saw in busybox) I am going to remove the filesystem content. Moreover, polluting the /tmp is usually not an issue. Thanks for your feedbacks, R. --0000000000005b34a105e9e306f3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Il Ven 30 Set 2022, 12:50 Bezdeka, Florian <florian.bezdeka@siemens.com> ha scritto:
On Fri, 2022-09-30 at 12:39 +0200, Roberto A. Foglietta wrot= e:

>
> =C2=A0as you can see my approach is straight simple: if extending the = ext4
> fails because it does not match the filesystem type then try with
> btrfs tool. Obviously, the btrfs tool is added as dependencies among > others before defined.

First: resize2fs does not only support ext4. It supports all of the ext
variants (ext2-ext4) to my understanding.

The man resize2fs said so: ext2/3/4.=C2= =A0

Due to the implement= ation of ext4 and ext2 with the backcompatibility of some features, the res= ize supported in ext4 is also supported in ext2 because it is a basic featu= re. Viceversa, a tool that resize ext2 will fail to resize ext4 much probab= ly because the journal.

Second: There might be= more reasons why resize2fs could fail. IMHO, it
doesn't make sense to run a btrfs tool on a ext filesystem that failed<= br> to expand.

It is not elegant but it does not hurt to run btrfs on ext4 or resize2f= s on btrfs.

Yes, I am a = raw penguin! LOL

Third: The mount point (/tmp/= btrfs) is never cleaned up in the Robertos
patch.

= I do umount but NOT rmdir because if for some reason umount fails (expecial= ly in combination with a bug that do not let the error code be returned, I = saw in busybox) I am going to remove the filesystem content. Moreover, poll= uting the /tmp is usually not an issue.

Thanks for your feedbacks, R.
--0000000000005b34a105e9e306f3--