public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Timber <dxdt@dev.snart.me>,
	linkinjeon@kernel.org, hyc.lee@gmail.com,
	almaz.alexandrovich@paragon-software.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, ntfs3@lists.linux.dev,
	David Timber <dxdt@dev.snart.me>
Subject: Re: [PATCH] ntfs(3): export super block magic
Date: Sun, 22 Mar 2026 13:53:01 +0800	[thread overview]
Message-ID: <202603221308.oDwds9wL-lkp@intel.com> (raw)
In-Reply-To: <20260319234047.43253-1-dxdt@dev.snart.me>

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

       reply	other threads:[~2026-03-22  5:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260319234047.43253-1-dxdt@dev.snart.me>
2026-03-22  5:53 ` kernel test robot [this message]
2026-03-22 14:23   ` [PATCH] ntfs(3): export super block magic David Timber

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=202603221308.oDwds9wL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=dxdt@dev.snart.me \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=ntfs3@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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