* Re: [PATCH] ntfs(3): export super block magic
[not found] <20260319234047.43253-1-dxdt@dev.snart.me>
@ 2026-03-22 5:53 ` kernel test robot
2026-03-22 14:23 ` David Timber
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-03-22 5:53 UTC (permalink / raw)
To: David Timber, linkinjeon, hyc.lee, almaz.alexandrovich
Cc: llvm, oe-kbuild-all, linux-fsdevel, ntfs3, David Timber
Hi David,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20260319]
[cannot apply to brauner-vfs/vfs.all linus/master v7.0-rc4 v7.0-rc3 v7.0-rc2 v7.0-rc4]
[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/David-Timber/ntfs-3-export-super-block-magic/20260320-181810
base: next-20260319
patch link: https://lore.kernel.org/r/20260319234047.43253-1-dxdt%40dev.snart.me
patch subject: [PATCH] ntfs(3): export super block magic
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260322/202603221308.oDwds9wL-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260322/202603221308.oDwds9wL-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603221308.oDwds9wL-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/ntfs/super.c:2152:18: error: use of undeclared identifier 'NTFS_SUPER_MAGIC'
2152 | sfs->f_type = NTFS_SUPER_MAGIC;
| ^
fs/ntfs/super.c:2355:16: error: use of undeclared identifier 'NTFS_SUPER_MAGIC'
2355 | sb->s_magic = NTFS_SUPER_MAGIC;
| ^
2 errors generated.
--
>> fs/ntfs3/super.c:734:16: error: use of undeclared identifier 'NTFS3_SUPER_MAGIC'
734 | buf->f_type = NTFS3_SUPER_MAGIC;
| ^
fs/ntfs3/super.c:1282:16: error: use of undeclared identifier 'NTFS3_SUPER_MAGIC'
1282 | sb->s_magic = NTFS3_SUPER_MAGIC;
| ^
2 errors generated.
vim +/NTFS_SUPER_MAGIC +2152 fs/ntfs/super.c
2123
2124 /*
2125 * ntfs_statfs - return information about mounted NTFS volume
2126 * @dentry: dentry from mounted volume
2127 * @sfs: statfs structure in which to return the information
2128 *
2129 * Return information about the mounted NTFS volume @dentry in the statfs structure
2130 * pointed to by @sfs (this is initialized with zeros before ntfs_statfs is
2131 * called). We interpret the values to be correct of the moment in time at
2132 * which we are called. Most values are variable otherwise and this isn't just
2133 * the free values but the totals as well. For example we can increase the
2134 * total number of file nodes if we run out and we can keep doing this until
2135 * there is no more space on the volume left at all.
2136 *
2137 * Called from vfs_statfs which is used to handle the statfs, fstatfs, and
2138 * ustat system calls.
2139 *
2140 * Return 0 on success or -errno on error.
2141 */
2142 static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs)
2143 {
2144 struct super_block *sb = dentry->d_sb;
2145 s64 size;
2146 struct ntfs_volume *vol = NTFS_SB(sb);
2147 struct ntfs_inode *mft_ni = NTFS_I(vol->mft_ino);
2148 unsigned long flags;
2149
2150 ntfs_debug("Entering.");
2151 /* Type of filesystem. */
> 2152 sfs->f_type = NTFS_SUPER_MAGIC;
2153 /* Optimal transfer block size. */
2154 sfs->f_bsize = vol->cluster_size;
2155 /* Fundamental file system block size, used as the unit. */
2156 sfs->f_frsize = vol->cluster_size;
2157
2158 /*
2159 * Total data blocks in filesystem in units of f_bsize and since
2160 * inodes are also stored in data blocs ($MFT is a file) this is just
2161 * the total clusters.
2162 */
2163 sfs->f_blocks = vol->nr_clusters;
2164
2165 /* wait event */
2166 if (!NVolFreeClusterKnown(vol))
2167 wait_event(vol->free_waitq, NVolFreeClusterKnown(vol));
2168
2169 /* Free data blocks in filesystem in units of f_bsize. */
2170 size = atomic64_read(&vol->free_clusters) -
2171 atomic64_read(&vol->dirty_clusters);
2172 if (size < 0LL)
2173 size = 0LL;
2174
2175 /* Free blocks avail to non-superuser, same as above on NTFS. */
2176 sfs->f_bavail = sfs->f_bfree = size;
2177
2178 /* Number of inodes in filesystem (at this point in time). */
2179 read_lock_irqsave(&mft_ni->size_lock, flags);
2180 sfs->f_files = i_size_read(vol->mft_ino) >> vol->mft_record_size_bits;
2181 read_unlock_irqrestore(&mft_ni->size_lock, flags);
2182
2183 /* Free inodes in fs (based on current total count). */
2184 sfs->f_ffree = atomic64_read(&vol->free_mft_records);
2185
2186 /*
2187 * File system id. This is extremely *nix flavour dependent and even
2188 * within Linux itself all fs do their own thing. I interpret this to
2189 * mean a unique id associated with the mounted fs and not the id
2190 * associated with the filesystem driver, the latter is already given
2191 * by the filesystem type in sfs->f_type. Thus we use the 64-bit
2192 * volume serial number splitting it into two 32-bit parts. We enter
2193 * the least significant 32-bits in f_fsid[0] and the most significant
2194 * 32-bits in f_fsid[1].
2195 */
2196 sfs->f_fsid = u64_to_fsid(vol->serial_no);
2197 /* Maximum length of filenames. */
2198 sfs->f_namelen = NTFS_MAX_NAME_LEN;
2199
2200 return 0;
2201 }
2202
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ntfs(3): export super block magic
2026-03-22 5:53 ` [PATCH] ntfs(3): export super block magic kernel test robot
@ 2026-03-22 14:23 ` David Timber
0 siblings, 0 replies; 2+ messages in thread
From: David Timber @ 2026-03-22 14:23 UTC (permalink / raw)
To: kernel test robot, linkinjeon, hyc.lee, almaz.alexandrovich
Cc: llvm, oe-kbuild-all, linux-fsdevel, ntfs3
On 3/22/26 14:53, kernel test robot wrote:
> Hi David,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on next-20260319]
> [cannot apply to brauner-vfs/vfs.all linus/master v7.0-rc4 v7.0-rc3 v7.0-rc2 v7.0-rc4]
> [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/David-Timber/ntfs-3-export-super-block-magic/20260320-181810
> base: next-20260319
> patch link: https://lore.kernel.org/r/20260319234047.43253-1-dxdt%40dev.snart.me
> patch subject: [PATCH] ntfs(3): export super block magic
> config: *hexagon*-allmodconfig (https://download.01.org/0day-ci/archive/20260322/202603221308.oDwds9wL-lkp@intel.com/config)
On 3/22/26 13:56, kernel test robot wrote:
> compiler: *sh4*-linux-gcc (GCC) 15.2.0
Interesting.
I didn't add #include <linux/magic.h> thinking that it's included in the
chain somwhere so it's redundant. Apparently, I was wrong. I smell
header hell situation here. Will investigate why these two arches don't
include <magic.h>. In the meantime, if you're interested in my
suggestion, let me know.
Davo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-22 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260319234047.43253-1-dxdt@dev.snart.me>
2026-03-22 5:53 ` [PATCH] ntfs(3): export super block magic kernel test robot
2026-03-22 14:23 ` David Timber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox