From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 47D861C84CB for ; Thu, 5 Mar 2026 00:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772670577; cv=none; b=lUpZ6fDRcgeYfbAQe6utw7A2gJUGzFBlL1dkZVZHvF8Je52vEGY4FMwKUl8pDTFtTPXsffCv4m7p/DSq5UhZNMpm5YtLd5inVQCUT9tlRPPix2TluybhqY9PhmKVyc1hIpvJ1OXqpmW3VBG8nhm6y0JBcZSOWtT3fVCNW26cEEc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772670577; c=relaxed/simple; bh=8w0/2aHTgk3Y1URJHcCGIqdHYV02OC9XJLx3AaRaVrI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pHTWc3lN/goj1Lr1XOMc1O4CQSd7yMytUYlJ0BVya4O65iOCvn1MS3B9p7ftxh4uPg3GfzmrwARggtwpiR7KZadq4r6kGox0GFjTZlc5omKD3vZ4d5lVV9mlTkWEXS3LxpOM7/Iq7/i2gSd0iZVykVLU4RQfcHqC5Aeh6ZvQ2eA= 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=EOEwvuTI; arc=none smtp.client-ip=209.85.216.53 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="EOEwvuTI" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-3598a09fcb3so1711655a91.0 for ; Wed, 04 Mar 2026 16:29:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772670575; x=1773275375; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9jlNrAz1UvM653xado2ms+LhpEPfsdXO8bzmSwpijj4=; b=EOEwvuTIEe1YQ6knzwBJigzq6Gag8aAZy88Lt3cBCm5mrOofMREs36BTSwCcXPOBjK ZkV4jecWmp/x73wWuydRKNuvrJcyiVNfoRU+y97LSKBbUOhRxWFIs05JChFfjKTWtz2N n7jZcXKVAeFFY1v6ytA2uVR+b9mimjPVDyLt4KUimaBJ4h0twrNzxWa7v9Nb0XAaYm+I j/Yhbf4KLVS0//zRqdNthhp91CVGJKnGtgGndxO7S8HJke771lJP47fWm2iaX8I8BHOm SjYbMnSjowdCWAxyZhgceldrx7iNCHeiR/Ko97ttfE0dMc1wq+43+H2qRxBfiMalUkaL /YOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772670575; x=1773275375; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9jlNrAz1UvM653xado2ms+LhpEPfsdXO8bzmSwpijj4=; b=l7b/Z0Hemv1pW32X5bxXYZaC2MFiPEepSY0DGS/eCHjWTGiLTR38zHbvH5SWr3Eipf L0K2NnsUvuvh0IDOyqMYNn6VIMjywdv/NtA43nSzfCk55L3GOveSQ9ATY0EqjMeyJIkN gU21OspXJzxnuJiIS6mrX6m3zn6ymaWseg0E+V36Hrj9QVStl2ytaeayoAOJKcQys1bi Kffh07ZaiHvD2pGLnkIE4yJM+UC6fVCFNMNMfs27VDC/LcTA/SUpMwJrECHvAUHHIZlW Iq2ukoh6pH4N1IttgZbcxueox0Ww5LAzGghXAS735EIX5hZc5PA0T01gktB8sRTnrIht 9MUw== X-Forwarded-Encrypted: i=1; AJvYcCV8ghJuazebhylJzNN2oa3ShhARINsxUv0gHZDZk+W+yLwGFM44wHI1mtagFN3vicemXCAdIvtXOc+TBjY=@vger.kernel.org X-Gm-Message-State: AOJu0YyRF1lK3NBF+0SwjnV1Z3boEpgz6jQRrttBp966Zqkr+F+8/S3j VdrMSrjAdnnI7htyE+tWwK3zTR9z8G9zysG9zqLgY+dKZMcchyRh0KhQ X-Gm-Gg: ATEYQzxwkWmZiR4OntuL8B+1EKj2M6YFqRgEigHxSUVbDW5yzpZyIvxZ2q23a2KMSzG zR0RblG6ZcWcHfxDCe2AdWP51/nhyCbKHb5BflRpt6PlL2ZnMCKDxVRopyesYVACQ8cTGR2vIyk QRYwUudfAVoZEgCFj5dzsutJfn/yn4VxrxGtOgy3T2znDO27KDk/QOUTS/n5QuTixyWN8g/7c3G Q/q1YmLPYAB8aNuBMqHm/9RVLy013P0+RuOhE/P7nxO4v6muGMPP0kVcqwz21+li7hKmg2w1nif +WuY7SJXJO/+lU0wyRBdQQsCw8pbcNg87DhUT00/WXlKKA0ojxfHRx7wlmXcuctxmkoxPtZkVry c5WCZ5wcmkE2xyOtHoEzLU/SF3K7oSTAjd0vDSFTPzf4nwtjlP+WWLgtxE7o01VSFviG/KSEuPf YKJV3a1D02Wc1OWg== X-Received: by 2002:a17:90b:1b0d:b0:359:8dc0:428d with SMTP id 98e67ed59e1d1-359a6a531acmr3412364a91.25.1772670575448; Wed, 04 Mar 2026 16:29:35 -0800 (PST) Received: from localhost ([27.122.242.71]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-359b2d50ebdsm73977a91.5.2026.03.04.16.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2026 16:29:34 -0800 (PST) Date: Thu, 5 Mar 2026 09:29:33 +0900 From: Hyunchul Lee To: Viacheslav Dubeyko Cc: "hch@infradead.org" , "glaubitz@physik.fu-berlin.de" , "frank.li@vivo.com" , "slava@dubeyko.com" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "cheol.lee@lge.com" Subject: Re: [PATCH] hfsplus: limit sb_maxbytes to partition size Message-ID: References: <20260303082807.750679-1-hyc.lee@gmail.com> <5c670210661f30038070616c65492fa2a96b028c.camel@ibm.com> 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=utf-8 Content-Disposition: inline In-Reply-To: <5c670210661f30038070616c65492fa2a96b028c.camel@ibm.com> On Wed, Mar 04, 2026 at 08:04:30PM +0000, Viacheslav Dubeyko wrote: > On Wed, 2026-03-04 at 05:08 -0800, Christoph Hellwig wrote: > > On Tue, Mar 03, 2026 at 05:28:07PM +0900, Hyunchul Lee wrote: > > > s_maxbytes currently is set to MAX_LFS_FILESIZE, > > > which allows writes beyond the partition size. > > > > The "partition size" does not matter here. s_maxbytes is the maximum > > size supported by the format and has nothing to do with the actual space > > allocated to the file system (which in Linux terminology would be the > > block device and not the partition anyway). > > > > > > > > As a result, > > > large-offset writes on small partitions can fail late > > > with ENOSPC. > > > > That sounds like some other check is missing in hfsplus, but it > > should be about the available free space, not the device size. > > > > I agree with Christoph. > > But, frankly speaking, I don't quite follow which particular issue is under fix > here. I can see that generic/268 failure has been mentioned. However, I can see > this: > > sudo ./check generic/268 > FSTYP -- hfsplus > PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.19.0-rc1+ #95 SMP > PREEMPT_DYNAMIC Thu Feb 19 15:29:55 PST 2026 > MKFS_OPTIONS -- /dev/loop51 > MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch > > generic/268 [not run] Reflink not supported by scratch filesystem type: > hfsplus > Ran: generic/268 > Not run: generic/268 > Passed all 1 tests > > Which particular issue is under fix? Sorry it's generic/285, not generic/268. in generic/285, there is a test that creates a hole exceeding the block size and appends small data to the file. hfsplus fails because it fills the block device and returns ENOSPC. However if it returns EFBIG instead, the test is skipped. For writes like xfs_io -c "pwrite 8t 512", should fops->write_iter returns ENOSPC, or would it be better to return EFBIG? > > Thanks, > Slava. -- Thanks, Hyunchul