From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail135.mailersend.net (mail135.mailersend.net [212.11.79.135]) (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 9EA6C32B102 for ; Wed, 10 Jun 2026 05:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.11.79.135 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781070584; cv=none; b=VMHKX2zYjvIydpV0utSYSYDuwuW+gW3jYf+SuJLbcZaJDsat6G2reW/jDoT3hL1Z/9/oEyYVpV7t9K2E3Q/uoAcXmDQ/c/X/jXA2fLQ/9z8jee9QLCjjFnjnxmqW23gEpO+OYvd3IB6+SppESUbef/E0lPgigxmB1VbDHNsNf2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781070584; c=relaxed/simple; bh=EOJ40Vb+1gII/syT9GUL8e9vhq+ISKk9xd8lpQUyLN4=; h=Subject:From:To:Cc:Date:Message-ID:MIME-Version:Content-Type; b=MUXx4VSW2vRVmr4/jfNIw14EDa/TtXecEatWoKoIOJb9kvPolHOJk/OSQkKucPpDp2SDe8WQ257EYhdAT0o0er4isrzRTHjQvHK6vHRPZ1Gnfx1sQil2vHw/Vg4pThG8+RN1dFGuF+s4UcpwiQyEBogS+b0LWi80koGbb0iyg+o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hatchling.org; spf=pass smtp.mailfrom=mta.hatchling.org; dkim=pass (1024-bit key) header.d=hatchling.org header.i=@hatchling.org header.b=X5RBpE3z; dkim=pass (1024-bit key) header.d=mailersend.net header.i=@mailersend.net header.b=Z1k4UN8l; arc=none smtp.client-ip=212.11.79.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hatchling.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mta.hatchling.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=hatchling.org header.i=@hatchling.org header.b="X5RBpE3z"; dkim=pass (1024-bit key) header.d=mailersend.net header.i=@mailersend.net header.b="Z1k4UN8l" DKIM-Signature: a=rsa-sha256; bh=8T/WpLUYw2yjVQSzvBDURq1U1Wn5nQElRds88WGFsLo=; c=relaxed/relaxed; d=hatchling.org; h=DKIM-Signature:X-Mailer-Info:Subject:From:To:Cc:Date:Received:Message-ID:X-MailerSend-RecipientID:Feedback-ID:X-MailerSend-MessageID:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; s=mlsend2; t=1781070356; v=1; b=X5RBpE3z/4zDoTYcWkRro1my0tu977VWfOvhHAzuBRk0/SJ9IXOElxvdVmfzjB+2IBnGKN/H 93mk2kj2o+kGurWNFx8fmrET7/JgJqJ8W9Hn15rCGDDa9VcBAKoEE0ON0Buw1nv262VdOfTey5f WZA45z01vcVtOPsErgPWtzxg= DKIM-Signature: a=rsa-sha256; bh=8T/WpLUYw2yjVQSzvBDURq1U1Wn5nQElRds88WGFsLo=; c=relaxed/relaxed; d=mailersend.net; h=X-Mailer-Info:Subject:From:To:Cc:Date:Received:Message-ID:X-MailerSend-RecipientID:Feedback-ID:X-MailerSend-MessageID:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; s=mlsend; t=1781070356; v=1; b=Z1k4UN8ls6TMtmttMXrUkb1WrZImycmwG+5bqnD5EC8Z/9aqgQ2HJGX3tMavnGSk9wMWlHk7 dMXM3GFbGUiUh4DlGr2E3rT+y34kjXnfqiJP+hoT7inlepjJvW6kbPNQGxnRzmRq5NbzAzsNOuX EBqDUh3j30SlfNHIbi5yCye8= X-Mailer-Info: 10.AZlZWY1xGd.AZlZWY1xGd0MTN5UzN.Abp5Wd41yalJnblxGQ2dWZy5yalJn blxmLvJ3Z.gNhJDOmFWM0ATZ2kjMhRzN0M2M5UTY1kzK0MTN5UzN.... Subject: [PATCH] fs/ntfs3: load ATTR_BITMAP run extents from $MFT extension records From: Senjin To: ntfs3@lists.linux.dev Cc: almaz.alexandrovich@paragon-software.com, linux-kernel@vger.kernel.org, Senjin Date: 10 Jun 2026 05:45:56 -0000 Received: from 10.32.5.223 by 10.132.0.99 with http; 10 Jun 2026 05:45:56 +0000 Message-ID: <6a28fa14d86c232e48a054a8@mailersend.net> X-MailerSend-RecipientID: 6a28fa14d86c232e48a054a8;6a28fa140e692a474c395a59;r9084zv9678gw63d Feedback-ID: r9084zv9678gw63d:MailerSend X-MailerSend-MessageID: 6a28fa1441ebd2207168956d Reply-To: senjin@hatchling.org 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-Transfer-Encoding: quoted-printable When $MFT's ATTR_BITMAP attribute is heavily fragmented, its run list can span multiple MFT extension records (attribute list entries with vcn > 0). The non-primary segment handler in ntfs_read_mft() only processed ATTR_DATA extension segments for MFT_REC_MFT, silently skipping any ATTR_BITMAP segments. This left sbi->mft.bitmap.run incomplete, causing wnd_init() to fail with -ENOENT when wnd_rescan() tried to look up a VCN not covered by the truncated run list. Observed on a 16 TB NTFS volume (0xFFFFFEFF total clusters) whose MFT bitmap run list was split across 97 extents in extension records. wnd_rescan() successfully looked up VCNs 0-122 from the runs loaded from the base record, then failed at VCN 123 (the last cluster of the bitmap) whose run was only present in an extension record. Fix by extending the MFT_REC_MFT special case to also handle ATTR_BITMAP extension segments, storing their runs into sbi->mft.bitmap.run the same way the primary segment does. Signed-off-by: Senjin --- fs/ntfs3/inode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index XXXXXXX..XXXXXXX 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -128,11 +128,16 @@ static struct inode *ntfs_read_mft(struct inode *i= node, if (le && le->vcn) { /* This is non primary attribute segment. Ignore if not MFT. */ - if (ino !=3D MFT_REC_MFT || attr->type !=3D ATTR_DATA) + if (ino !=3D MFT_REC_MFT) goto next_attr; - run =3D &ni->file.run; + if (attr->type =3D=3D ATTR_DATA) + run =3D &ni->file.run; + else if (attr->type =3D=3D ATTR_BITMAP) + run =3D &sbi->mft.bitmap.run; + else + goto next_attr; + asize =3D le32_to_cpu(attr->size); goto attr_unpack_run; } -- 2.x