From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 437F226AA91 for ; Wed, 19 Nov 2025 08:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763541799; cv=none; b=CcyEgQL7TBRY2EXNXiQ4is1Z2exaKGB9+bulrTm86+hpF84/GlXmOffQRQrTrvKCrU274MsDWwffpYN327L6brqPdNuNb4ezwaw30QZ8/NNLdsfPQxKKRDMTuws2L5aNJEBCW6jtaP6++JpVShxuSalV7J7XMZI9hVCoBuCaRt0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763541799; c=relaxed/simple; bh=bdYyLvIYP1aH94dbshsALIDBnw0PfPRI2/SyDHOEpRY=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jrI4Cohe0kYMcYhsh9/GXvnaHkFB1BcEgDTOIy9keh4U0KnQZde5xqZYa4KK7iTqJzXcva7zrDqxPtLI1Ukv/v3QlM5DkAEFwJX9Wgv9YKnVXOYzv42ZbeJ9h6wMJfExY/OwQ54a29FQ3RfxM5eBl5Ymj4ZPrN8olplD+QRC2aU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bVaFmZV7; arc=none smtp.client-ip=209.85.208.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bVaFmZV7" Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-37a49389deeso38992021fa.0 for ; Wed, 19 Nov 2025 00:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763541796; x=1764146596; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=INaB9EDIenz4qmIu9d6URvGNxpB4f3VMssLlJTGmYI8=; b=bVaFmZV7ImvrPBphV6gtOKO2HyuGRAeFUfSIDtTwhx7xHhfOezJWlNs5XtXvuEazme uQnhhY/TUP6MDC9AsxoCwjJvP6sFPMGY2rGJsMR8W7VXvWHjS/QsAN8GZlZqQg3Q/YvM mRWpvl61j7CAzgEoA5QwCftWqseCB1uOHqFYjYCAYKitIcdp93owvOmoJMC7aYIXGWoC vXPYo6c/dre0iVSiYzQYlb2LD6ydGbatKWEnDrIIecaVUTHLB52ucVkrV+qeL66ibJXG YsJpukjIfexZcEQyPtR5quZCGVj5lQ/8hW9FizRqnXZ8kqBAlhEYBLJAgdEpEypgpE4h l/BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763541796; x=1764146596; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=INaB9EDIenz4qmIu9d6URvGNxpB4f3VMssLlJTGmYI8=; b=YaNPWxK461sovcgvpc07Mbfd3QrNV7n8EUC7IdrC0q+Lr6j7Q4zF+52DgO6qFHvjZI gWjy6JnUWkjNjRnOuqzo/ut+Airk62Q39q9lbnUKQWaD5NG+DaiKCHZvVnTJXCAdt49i EowEN9477+9sOuZ3IfhAfmXPH/kl0h9PXw+AyBGz/TiV+PPSTSaMGTkTx1FKtilciC5z iGSGjKJauvJ5E0Z1P2jxpaGkJ7upMNga+rUc0eNRyR3qJ/PAAuE+AjQM9e/5xm+ENjEN X9kP5gF07skyo18URqb+xl8roBi9NstsH2k7KinWbCFYEUwAYXzvMYL2ziGpGtX11/eR DGpg== X-Forwarded-Encrypted: i=1; AJvYcCXOh9FGASEo4wbkmLpkg0ukzid+DKXuh0D2QLsKfR+Ch3wrs7sTpFMlyRe+VD6JVpnqiBrjbWZ9vsW0cZA=@vger.kernel.org X-Gm-Message-State: AOJu0YxYlQYnNqK78ySr31dC/VUu+TrdzdWBBtOKm8cOdDnfvkSomSEW bS+GeR75mlBpUmH67Aosjw3YJ7VfGu/Sehgy7Vi3+Q0Dl2UjbhEiauirTedgUSVA X-Gm-Gg: ASbGncuA6IyaOj9/MhPNossgkoZPI45uMJ7T2mr4UnSQU+XabcrD5LHJZMTtL3GE+m8 zDlkbGSyqUotUfh4aOYcsqzIAJE0pOj/jDjl+hto51zFfc9mL2NDpnl71tOISoXbf8cLn4u06/Q JOkaZN0roaKoPg0pEZzRITd+c+pDwB0dZCiqildI499lz/wDWUs1ANXhnmGN8tw7kXWSLyE20JW p0qJC1mxhL94GVOCGT3J0a9ip4FBu/DWPwFFKza8m61trnwoY63dsGpJ8h08HUGLbTzjCqgH+HY C+ueVx2j4NBKLRf7CLxHm0pZwwllp+HqA+I+kUZDZiTwv9WoO9Vhu8fUkccYwKUFgRSfNjCM3rH 75kHozDOctKb3WkLfrJ9CM1J//Jaso48BLDqkfGUjncbWGr6g9JQrawpnMkiSOPFYm9bcVgfEbK VA+zY6JL0V0VdExoODQIkX8ecsT+zXGiGvaKZk2UrDUT4Vguc8m30= X-Google-Smtp-Source: AGHT+IFPJ30Mh/UuQhQXXD+Y1U03K89TzBiGVqJdMh5JBZoXViEpYNLAH4zmr8rXdLIQpSXMsSJEwg== X-Received: by 2002:a05:651c:325a:b0:372:8d61:c26f with SMTP id 38308e7fff4ca-37babbc92b5mr58796551fa.11.1763541796102; Wed, 19 Nov 2025 00:43:16 -0800 (PST) Received: from pc636 (host-90-233-212-127.mobileonline.telia.com. [90.233.212.127]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-37b9ced4abesm37688641fa.31.2025.11.19.00.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Nov 2025 00:43:15 -0800 (PST) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Wed, 19 Nov 2025 09:43:13 +0100 To: Christoph Hellwig Cc: Mikulas Patocka , Benjamin Marzinski , Uladzislau Rezki , Alasdair Kergon , DMML , Andrew Morton , Mike Snitzer , LKML Subject: Re: [RESEND PATCH] dm-ebs: Mark full buffer dirty even on partial write Message-ID: References: <20251117105945.10179-1-urezki@gmail.com> <73556fc8-5fbf-37cb-26b9-7cdb88f69720@redhat.com> <230baa83-cd79-f232-5fb8-1476115e1ae7@redhat.com> <20251119054635.GB19993@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251119054635.GB19993@lst.de> On Wed, Nov 19, 2025 at 06:46:35AM +0100, Christoph Hellwig wrote: > On Tue, Nov 18, 2025 at 06:21:56PM +0100, Mikulas Patocka wrote: > > OK - I accepted Uladzislau's patch. As logical block size and physical > > block size seem to be unreliable, it's better to set the size in dm-ebs. > > logical and physical block size are reliable. Uladzislau just seems > to have a completely broken device that needs fixing, because it will > run into all kinds of other problems otherwise. > Well. LBA is fixed in my case. Just only one format which is 512B. Whereas the I/O can not be performed by using LBAs sizes. It is fixed and bigger. I rely on this: /* * Construct an emulated block size mapping: [] * * : path of the underlying device * : offset in 512 bytes sectors into * : emulated block size in units of 512 bytes exposed to the upper layer * []: underlying block size in units of 512 bytes imposed on the lower layer; * optional, if not supplied, retrieve logical block size from underlying device */ static int ebs_ctr(struct dm_target *ti, unsigned int argc, char **argv) { ... to do RMW. It says if UBS is set, data has to impose to lower layer in sizes of UBS and aligned to UBS. I specify the UBS what my device is capable of reading/writing. The buffer is correctly updated in terms of RMW in UBS window. But it flushes partly leading to I/O errors. I find it wrong. Because i set the desired underlying block size. That is my concern. -- Uladzislau Rezki