Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iNt9L-00009n-RQ for mharc-grub-devel@gnu.org; Fri, 25 Oct 2019 02:32:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34823) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNt95-0008VH-49 for grub-devel@gnu.org; Fri, 25 Oct 2019 02:32:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNt90-0007Oi-CI for grub-devel@gnu.org; Fri, 25 Oct 2019 02:32:20 -0400 Received: from m9a0002g.houston.softwaregrp.com ([15.124.64.67]:38273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iNt8y-0007O8-7V for grub-devel@gnu.org; Fri, 25 Oct 2019 02:32:17 -0400 Received: FROM m9a0002g.houston.softwaregrp.com (15.121.0.190) BY m9a0002g.houston.softwaregrp.com WITH ESMTP FOR grub-devel@gnu.org; Fri, 25 Oct 2019 06:31:33 +0000 Received: from M4W0335.microfocus.com (2002:f78:1193::f78:1193) by M9W0067.microfocus.com (2002:f79:be::f79:be) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 25 Oct 2019 06:32:03 +0000 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (15.124.8.14) by M4W0335.microfocus.com (15.120.17.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Fri, 25 Oct 2019 06:32:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nJy+LH6j4ddP/69fdMm7T8GLZ11yfj0L4K682LEcJ0ClV9XYWYkvoKMPEcVeqCgnsN9EjW1k7gjLRZMH1QyQdMiCZJisyDdQQ50koKaCJf7UbPiPGtFzu2ZsuUvo3zV8GVOwrUJeQ3UBIjuyJmYSA0sgDzpuENNgqAzC/6qfeCvz+mVZKgCRhG29So/2+1YBhBPrNp8kf7g4iz9y8pA+goYwNas7eKtE6RqEOhk4ud1MQ1SQwKhmcqAXvgbah8B+bOGL6JZEMy1UjWMHMOE4BRgYEbThqy8UOCx2uXS1WAlJF6SsLghE9yMMLESzsrO2WhNuHj5QTY6QCWSGdwkEaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZdrrzJjE4kLhopN3GzchpojinVCHkcAg6S227erRtCU=; b=eTmdDalddOXObpMtlAZrHgNrAPJ1KWh7zbvTRf8PIRGIi6pvt/z5MJMvvi0r7VdxxutsEa5bjBzj5PSHqDj+SDDABvk5OlqhCJpiEn7/O6DuRkWB7DZbQ0WeITmgza5vAs9aMFxXNmKdlKIpAvlukvM/5bd/zggoOpQTMc1x+rN7165qMxt1+mwVww6ISj3cG1zmISpCi7QC+SOGyGB6BNOIwwhWxI0U9VPrjIH9HRcvOjMVYPnQMH1eUkuVyEzui8e8gecI3H5MMyZ1WCnMLW3+d5bbg29AT2AB9APQT49LhChh+h548npwYdYPsx1nlkytUIQVTUKcgfszpnN88w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from MN2PR18MB3133.namprd18.prod.outlook.com (10.255.238.143) by MN2PR18MB3165.namprd18.prod.outlook.com (10.255.236.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.24; Fri, 25 Oct 2019 06:31:56 +0000 Received: from MN2PR18MB3133.namprd18.prod.outlook.com ([fe80::44df:626d:415c:a44]) by MN2PR18MB3133.namprd18.prod.outlook.com ([fe80::44df:626d:415c:a44%7]) with mapi id 15.20.2387.021; Fri, 25 Oct 2019 06:31:56 +0000 From: Michael Chang To: The development of GNU GRUB Subject: Re: [PATCH] lvm: add lvm cache logical volume handling Thread-Topic: [PATCH] lvm: add lvm cache logical volume handling Thread-Index: AQHVg+kcyQnYrvfSdkigs0DupfD//KdoFvWAgAEsfICAALIJAIAA/nGA Date: Fri, 25 Oct 2019 06:31:56 +0000 Message-ID: <20191025063145.GB16881@mazu> References: <20191016061516.32129-1-mchang@suse.com> <20191023104823.uxaqf5uxkr6jr3lx@tomti.i.net-space.pl> <20191024044351.GA8270@mazu> <20191024152104.u3uywhpknw2sjwmi@tomti.i.net-space.pl> In-Reply-To: <20191024152104.u3uywhpknw2sjwmi@tomti.i.net-space.pl> Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P123CA0029.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600::17) To MN2PR18MB3133.namprd18.prod.outlook.com (2603:10b6:208:16b::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=MChang@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [60.251.47.116] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2e1f8df4-f889-4d7f-12ba-08d75915080b x-ms-traffictypediagnostic: MN2PR18MB3165: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 02015246A9 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(7916004)(376002)(346002)(136003)(396003)(39860400002)(366004)(199004)(189003)(6506007)(6512007)(9686003)(55236004)(229853002)(80792005)(2906002)(6246003)(5660300002)(99286004)(6306002)(186003)(26005)(102836004)(6116002)(446003)(6436002)(11346002)(305945005)(386003)(476003)(6486002)(1076003)(486006)(7736002)(3846002)(14454004)(66476007)(33656002)(66946007)(33716001)(66556008)(71190400001)(64756008)(8936002)(966005)(71200400001)(14444005)(86362001)(66446008)(256004)(66066001)(6916009)(52116002)(76176011)(316002)(25786009)(8676002)(81156014)(81166006)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR18MB3165; H:MN2PR18MB3133.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6CsCBJCcQu8oa9YrL85lil9BnrKijKJyUNOqoF2MiQDJLSaXafnPw/QjOqwu7bbjnr1TWRxuogDMzRiu+I+nTKazQb29CFrGuEqxR+Nmbskjvv6nOYaILjy95qeNfleB3QD6mVqcrxeTUHzb0Rrn4LfZcy6z+U383IMhl5t8uQhOxAKlmC6+AVe69aXZp+DLn2t4uYKim4BuKDKOT/KMjGUgWZUrDEvUrvrd3ApAzaYcJusp1LrYxl1NA90MpehuNAz1sFlMA3AItFRwjNU3Hv3nXtGDRYKneWcC6ZFzbKkeSs3XXAO2AVM+JQrWFO7k8szt4Rb7tmkM2+8YAycfmmMZRUZiQhgXx65UbiY8rd8uo9VhUcAB4gkZj8m35P6IAQd/wt//Vz86wBCVIYvBKQtzAPRcvopTnRQq1vOk2DxB3a1zsUreHGMAqPYYFROINQT+U+NhK5ArRy04VhbxxyWVtdVNaqPhVadx1ZXT4OE= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2e1f8df4-f889-4d7f-12ba-08d75915080b X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2019 06:31:56.3231 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ny847xwoJv+qsJAGhc+eKsZyF3bIT4JzKruPkVWHsbcm49juUU9RBT6wC/jUjO6l X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3165 X-OriginatorOrg: suse.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 15.124.64.67 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2019 06:32:35 -0000 On Thu, Oct 24, 2019 at 05:21:04PM +0200, Daniel Kiper wrote: > On Thu, Oct 24, 2019 at 04:43:58AM +0000, Michael Chang wrote: > > On Wed, Oct 23, 2019 at 12:48:23PM +0200, Daniel Kiper wrote: > > > On Wed, Oct 16, 2019 at 06:15:30AM +0000, Michael Chang wrote: > > > > The lvm cache logical volume is the logical volume consisting of th= e > > > > original and the cache pool logical volume. The original is usually= on a > > > > larger and slower storage device while the cache pool is on a small= er > > > > and faster one. The performance of the original volume can be impro= ved > > > > by storing the frequently used data on the cache pool to utilize th= e > > > > greater performance of faster device. > > > > > > > > The default cache mode "writethrough" ensures that any data written= will > > > > be stored both in the cache and on the origin LV, therefore grub ca= n go > > > > straight to read the original lv as no data loss is guarenteed. > > > > > > > > The second cache mode is "writeback", which delays writing from the > > > > cache pool back to the origin LV to have increased performance. The > > > > drawback is potential data loss if losing the associated cache devi= ce. > > > > > > > > During the boot time grub reads the LVM offline i.e. LVM volumes ar= e not > > > > activated and mounted, IMHO it should be fine to read directly from > > > > original lv since all cached data should have been flushed back in = the > > > > process of taking it offline. > > > > > > Is it possible to enforce all GRUB writes to the original device inst= ead > > > of cache during installation process? > > > > I couldn't give concrete answer whether it is possible, but it sounds t= o > > me not good idea because in general bypassing the cache could > > potentially break the consistency of data and the data being cached. > > > > Perhaps some system calls could help to sync the data out of the lvm > > cache to the original LV during installation process. It seems fsync > > does it for us, but I didn't have good idea either if it is enough. >=20 > May I ask you to investigate that and if it is needed add required > install code. I mean fsync(), etc. Sure. And please bear with me if it takes long to answer as other task was sidetracking.=20 Thanks, Michael >=20 > Daniel >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel