From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796524914; b=TJ43wjLbH3e5+Sya9CCj3PStq1vGlrE1Rwu6YRhx//LtbO8pTh8SuheVtvO5QZrXUg7o qe6Z/hYztljguw5MpadoaOzOi9nbCaE3uEuJlPRrh97amWCBDRgP3eyXPh63XdGrazosx BPU4mZeVs41K7fvktaXpidZSuTbA51A8VSSrO/hfB6QyopOVu868kFq0iZ4I2kSuUAMOR HbP9cTUdxqco99BrebYQRNFrvyvIh0nSNXEwm7PVoDc13/QFq0wLQj4WjWeO/koO2D0l+ RffHLcQP9Ax7DSOPBspBY8i3KDxpyeaA9Xp5QZlKnUXSgzJ/VHgsXwjJ9m2TZltDjaw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796524914; h=DMARC-Filter:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-CM-TRANSID: X-Coremail-Antispam:X-CM-SenderInfo; bh=JrIEVh0HUIeDM2sbZvlmD+5b9kcpyyPx8Oa3n06E5dg=; b=uZKKYYUEHr7jG3ZDolY5P0h4ooop3MGVcER7ikhJM5870vmbQP6qV3+a38XlYziFUwzw BHzjFDwhX8xYl5nWtw9W8SROMPY6XDRs4q3d3z9nK+2edbnMP5RcltIF+GZwsbcGIFwS+ jug9mOJBi3T9WPmEVPXKKXyl+scjWeZYSeolEu8jMeGNiq3aDybPpVp7jNHpBlxZOjjLr jVkxmSlYb4vgGtmm627nY4CtDUu3z9HVrZVo8Dxd5tKxo66q1uts1xWV5kHl2e+jaWIP4 Ojn/IzK3TORuOzmLXJzy/Zog/ZdJFFn/ArpnXRlHQDiy8xpf+LjVqFlx6Z9ItHDqY1Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=lNp1kttT; arc=none smtp.remote-ip=220.197.31.4 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6440606A321; Sun, 6 Dec 2026 02:41:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C6440606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=lNp1kttT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:To:From: Content-Type; bh=JrIEVh0HUIeDM2sbZvlmD+5b9kcpyyPx8Oa3n06E5dg=; b=lNp1kttTgOBdanqRbYLkh8Okn1wTouVI6JmHRFoO/puLfPh2q8FWuHuFt6zGKK Z1MsEKqh91rwpPNBDp1NbXsPLiQ60Axd9r24jaKzbrW6hr6ipOrD+oDBQtsK8bnO dA5nVjY2l/4y4dtbc6FewhcjHxAvZ7C079cqo86jZwjgs= Message-ID: Date: Sun, 6 Dec 2026 10:41:15 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 2/6] ntfs: roll back the size update when the attribute lookup fails To: kernel test robot , Hongling Zeng , linkinjeon@kernel.org, hyc.lee@gmail.com Cc: oe-kbuild-all@lists.linux.dev, ntfs@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Baolin Liu References: <20261202054112.1138977-3-zenghongling@kylinos.cn> <20261205213335.QXttRKO7-lkp@intel.com> Content-Language: en-US From: liubaolin In-Reply-To: <20261205213335.QXttRKO7-lkp@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:PigvCgDXPEBLyxRrfmkeKQ--.57463S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxGFWfAF43Jw48Ar1xAr4kCrg_yoWrAw4kpr Wj9rn2yrWUXrn7Jrs7KrW5Xw15Kw4kXw45WFyDGF1fAFWDWr10qF1xKrWI9FZ2v34kKry5 tryqqrZ3Zr1DZaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07U5xhJUUUUU= X-CM-SenderInfo: xolxutxrol0iasrtmqqrwthudrp/xtbC6g3lsGsUy03SEwAA3K 在 2026/12/5 21:38, kernel test robot 写道: > Hi Hongling, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on next-20261130] > [also build test ERROR on v7.4-rc5] > [cannot apply to brauner-vfs/vfs.all linus/master v7.4-rc5 v7.4-rc4 v7.4-rc3] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Hongling-Zeng/ntfs-mark-the-record-dirtied-by-a-resident-write-in-iomap_end/20261202-134107 > base: next-20261130 > patch link: https://lore.kernel.org/r/20261202054112.1138977-3-zenghongling%40kylinos.cn > patch subject: [PATCH v6 2/6] ntfs: roll back the size update when the attribute lookup fails > config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20261205/20261205213335.QXttRKO7-lkp@intel.com/config) > compiler: sh4-linux-gcc (GCC) 16.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261205/20261205213335.QXttRKO7-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/20261205213335.QXttRKO7-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > fs/ntfs/inode.c: In function 'ntfs_inode_rollback_enlarge': >>> fs/ntfs/inode.c:4173:40: error: implicit declaration of function 'ntfs_attr_set_data_size' [-Wimplicit-function-declaration] > 4173 | rollback_err = ntfs_attr_set_data_size(ni, > | ^~~~~~~~~~~~~~~~~~~~~~~ > > > vim +/ntfs_attr_set_data_size +4173 fs/ntfs/inode.c Hi Hongling, I think this one comes from the base tree rather than the patch. 2/6 calls ntfs_attr_set_data_size(), which was added by "ntfs: trim the sizes after a short write", and the series is based on that commit. The tree the robot used, next-20261130, did not have it yet; next-20261204 does. On ntfs-next the series builds fine for me, so I would leave the code as it is. Thanks, Baolin. > > 4146 > 4147 /* Undo the deferred size update like ntfs_write_rollback() does. */ > 4148 static void ntfs_inode_rollback_enlarge(struct inode *vi, > 4149 struct ntfs_inode *mrec_ni, s64 new_data_size, > 4150 s64 old_data_size, s64 old_alloc_size) > 4151 { > 4152 struct ntfs_inode *ni = NTFS_I(vi); > 4153 bool stream = ntfs_inode_is_named_stream(ni); > 4154 unsigned long flags; > 4155 s64 current_data_size; > 4156 int rollback_err = 0; > 4157 > 4158 if (stream) > 4159 truncate_setsize(vi, old_data_size); > 4160 > 4161 mutex_lock(&mrec_ni->mrec_lock); > 4162 read_lock_irqsave(&ni->size_lock, flags); > 4163 current_data_size = ni->data_size; > 4164 read_unlock_irqrestore(&ni->size_lock, flags); > 4165 if (current_data_size == new_data_size) { > 4166 /* Free only what the write allocated. */ > 4167 s64 keep = max(old_data_size, old_alloc_size); > 4168 > 4169 if (ni->allocated_size > keep) > 4170 rollback_err = __ntfs_attr_truncate_vfs(ni, keep, > 4171 keep); > 4172 if (!rollback_err && ni->data_size != old_data_size) >> 4173 rollback_err = ntfs_attr_set_data_size(ni, > 4174 old_data_size); > 4175 } > 4176 mutex_unlock(&mrec_ni->mrec_lock); > 4177 if (rollback_err) { > 4178 /* The sizes may be inconsistent now. */ > 4179 read_lock_irqsave(&ni->size_lock, flags); > 4180 current_data_size = ni->data_size; > 4181 read_unlock_irqrestore(&ni->size_lock, flags); > 4182 i_size_write(vi, current_data_size); > 4183 NVolSetErrors(ni->vol); > 4184 ntfs_error(vi->i_sb, "Failed to roll back the size update: %d", > 4185 rollback_err); > 4186 } else if (current_data_size != new_data_size) { > 4187 /* A concurrent write took over the extension. */ > 4188 i_size_write(vi, current_data_size); > 4189 } else if (!stream) { > 4190 /* No folio was dropped. */ > 4191 i_size_write(vi, old_data_size); > 4192 } > 4193 } > 4194 >