All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pankaj Raghav <p.raghav@samsung.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC 2/4] buffer: add alloc_folio_buffers() helper
Date: Fri, 14 Apr 2023 22:04:34 +0800	[thread overview]
Message-ID: <202304142125.IA2eKPjg-lkp@intel.com> (raw)
In-Reply-To: <20230414110821.21548-3-p.raghav@samsung.com>

Hi Pankaj,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on vfs-idmapping/for-next]
[also build test WARNING on linus/master v6.3-rc6 next-20230413]
[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/Pankaj-Raghav/buffer-add-alloc_folio_buffers-helper/20230414-200852
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git for-next
patch link:    https://lore.kernel.org/r/20230414110821.21548-3-p.raghav%40samsung.com
patch subject: [RFC 2/4] buffer: add alloc_folio_buffers() helper
config: riscv-allnoconfig (https://download.01.org/0day-ci/archive/20230414/202304142125.IA2eKPjg-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/a5c44e7a616f7a972e4570437b81778c20c15137
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Pankaj-Raghav/buffer-add-alloc_folio_buffers-helper/20230414-200852
        git checkout a5c44e7a616f7a972e4570437b81778c20c15137
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304142125.IA2eKPjg-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/buffer.c:913:21: warning: no previous prototype for 'alloc_folio_buffers' [-Wmissing-prototypes]
     913 | struct buffer_head *alloc_folio_buffers(struct folio *folio, unsigned long size,
         |                     ^~~~~~~~~~~~~~~~~~~


vim +/alloc_folio_buffers +913 fs/buffer.c

   903	
   904	/*
   905	 * Create the appropriate buffers when given a folio for data area and
   906	 * the size of each buffer.. Use the bh->b_this_page linked list to
   907	 * follow the buffers created.  Return NULL if unable to create more
   908	 * buffers.
   909	 *
   910	 * The retry flag is used to differentiate async IO (paging, swapping)
   911	 * which may not fail from ordinary buffer allocations.
   912	 */
 > 913	struct buffer_head *alloc_folio_buffers(struct folio *folio, unsigned long size,
   914						bool retry)
   915	{
   916		struct buffer_head *bh, *head;
   917		gfp_t gfp = GFP_NOFS | __GFP_ACCOUNT;
   918		long offset;
   919		struct mem_cgroup *memcg, *old_memcg;
   920	
   921		if (retry)
   922			gfp |= __GFP_NOFAIL;
   923	
   924		/* The folio lock pins the memcg */
   925		memcg = folio_memcg(folio);
   926		old_memcg = set_active_memcg(memcg);
   927	
   928		head = NULL;
   929		offset = folio_size(folio);
   930		while ((offset -= size) >= 0) {
   931			bh = alloc_buffer_head(gfp);
   932			if (!bh)
   933				goto no_grow;
   934	
   935			bh->b_this_page = head;
   936			bh->b_blocknr = -1;
   937			head = bh;
   938	
   939			bh->b_size = size;
   940	
   941			/* Link the buffer to its folio */
   942			set_bh_folio(bh, folio, offset);
   943		}
   944	out:
   945		set_active_memcg(old_memcg);
   946		return head;
   947	/*
   948	 * In case anything failed, we just free everything we got.
   949	 */
   950	no_grow:
   951		if (head) {
   952			do {
   953				bh = head;
   954				head = head->b_this_page;
   955				free_buffer_head(bh);
   956			} while (head);
   957		}
   958	
   959		goto out;
   960	}
   961	EXPORT_SYMBOL_GPL(alloc_folio_buffers);
   962	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  parent reply	other threads:[~2023-04-14 14:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230414110825eucas1p1ed4d16627889ef8542dfa31b1183063d@eucas1p1.samsung.com>
2023-04-14 11:08 ` [RFC 0/4] convert create_page_buffers to create_folio_buffers Pankaj Raghav
2023-04-14 11:08   ` [RFC 1/4] fs/buffer: add set_bh_folio helper Pankaj Raghav
2023-04-14 11:08   ` [RFC 2/4] buffer: add alloc_folio_buffers() helper Pankaj Raghav
2023-04-14 13:06     ` Matthew Wilcox
2023-04-14 15:01       ` Pankaj Raghav
2023-04-14 14:04     ` kernel test robot [this message]
2023-04-14 14:45     ` kernel test robot
2023-04-14 11:08   ` [RFC 3/4] fs/buffer: add folio_create_empty_buffers helper Pankaj Raghav
2023-04-14 13:16     ` Matthew Wilcox
2023-04-14 11:08   ` [RFC 4/4] fs/buffer: convert create_page_buffers to create_folio_buffers Pankaj Raghav
2023-04-14 13:21     ` Matthew Wilcox
2023-04-14 13:47   ` [RFC 0/4] " Hannes Reinecke
2023-04-14 13:51     ` Matthew Wilcox
2023-04-14 13:56       ` Hannes Reinecke
2023-04-14 15:00     ` Pankaj Raghav
2023-04-15  1:01     ` Luis Chamberlain
2023-04-15  2:31       ` Matthew Wilcox
2023-04-15  3:24         ` Luis Chamberlain
2023-04-15  3:44           ` Matthew Wilcox
2023-04-15 13:14             ` Hannes Reinecke
2023-04-15 17:09               ` Matthew Wilcox
2023-04-16  1:28                 ` Luis Chamberlain
2023-04-16  3:40                   ` Matthew Wilcox
2023-04-16  5:26                     ` Luis Chamberlain
2023-04-16 14:07                       ` Matthew Wilcox
2023-04-17 15:40                         ` Darrick J. Wong
2023-04-16 22:57                       ` Dave Chinner
2023-04-17  2:27     ` Luis Chamberlain
2023-04-17  6:04       ` Hannes Reinecke

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=202304142125.IA2eKPjg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=p.raghav@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.