mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Axel Dörfler" <axeld@pinc-software.de>
To: Luis de Bethencourt <luisbg@kernel.org>,
	Salah Triki <salah.triki@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] befs: Large file support and a superblock check fix
Date: Mon,  2 Nov 2026 15:17:11 +0100	[thread overview]
Message-ID: <20261102141714.306719-1-axeld@pinc-software.de> (raw)

Two small befs fixes I originally sent in 2019 [1][2], which never got
picked up. Rebased onto v7.3 and resent as v2.

Patch 1 lets befs serve files larger than 2GiB; the on-disk format and
the implementation already handle 64-bit file sizes, only s_maxbytes was
never raised from the MAX_NON_LFS default.

Patch 2 replaces a superblock consistency check that compares ag_shift
against blocks_per_ag, and therefore emits an error message on basically
every valid volume, with the check the BFS reference implementation
uses. Note that a mismatch now fails the mount, like the other
structural superblock checks do.

In v1, patch 2 just removed the check; the corresponding v1 thread is
"befs: Removed incorrect check" [2].

Changes since v1:
- Patch 1: rebased; sb_set_blocksize() is now checked for failure, so
  the assignment moved below the new error path.
- Patch 2: replace the incorrect check with the one from the BFS
  reference implementation instead of just removing it, limit ag_shift
  to what a block_run can address, and explain what ag_shift and
  blocks_per_ag actually mean.

Both patches were build-tested with W=1 and CONFIG_BEFS_DEBUG=y on
x86_64 and i386, and tested by mounting a Haiku volume: the bogus
ag_shift error is gone, and a file larger than 2GiB can now be read
beyond the 2GiB boundary.

[1] https://lore.kernel.org/lkml/?q=s:%22befs:+Allow+file+sizes+beyond+2GiB%22
[2] https://lore.kernel.org/lkml/?q=s:%22befs:+Removed+incorrect+check%22

Axel Dörfler (2):
  befs: Allow file sizes beyond 2GiB
  befs: Fix allocation group consistency check

 fs/befs/linuxvfs.c |  1 +
 fs/befs/super.c    | 22 +++++++++++++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)


base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
-- 
2.56.0


             reply	other threads:[~2026-11-02 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 14:17 Axel Dörfler [this message]
2026-11-02 14:17 ` [PATCH v2 1/2] befs: Allow file sizes beyond 2GiB Axel Dörfler
2026-11-02 14:17 ` [PATCH v2 2/2] befs: Fix allocation group consistency check Axel Dörfler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261102141714.306719-1-axeld@pinc-software.de \
    --to=axeld@pinc-software.de \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luisbg@kernel.org \
    --cc=salah.triki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®