[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201802011653.HQl98aqN%fengguang.wu@intel.com>
Date: Thu, 1 Feb 2018 16:05:56 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Bob Peterson <rpeterso@...hat.com>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
Andreas Gruenbacher <agruenba@...hat.com>
Subject: fs/gfs2/log.c:717: undefined reference to `crc32c'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 255442c93843f52b6891b21d0b485bf2c97f93c3
commit: c1696fb85d33194cf65c7ebfc82a75696299c3a3 GFS2: Introduce new gfs2_log_header_v2
date: 9 days ago
config: x86_64-randconfig-a0-02011154 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
git checkout c1696fb85d33194cf65c7ebfc82a75696299c3a3
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
fs/gfs2/log.o: In function `gfs2_write_log_header':
>> fs/gfs2/log.c:717: undefined reference to `crc32c'
fs/gfs2/recovery.o: In function `get_log_header':
>> fs/gfs2/recovery.c:152: undefined reference to `crc32c'
vim +717 fs/gfs2/log.c
653
654 /**
655 * write_log_header - Write a journal log header buffer at sd_log_flush_head
656 * @sdp: The GFS2 superblock
657 * @jd: journal descriptor of the journal to which we are writing
658 * @seq: sequence number
659 * @tail: tail of the log
660 * @flags: log header flags GFS2_LOG_HEAD_*
661 * @op_flags: flags to pass to the bio
662 *
663 * Returns: the initialized log buffer descriptor
664 */
665
666 void gfs2_write_log_header(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
667 u64 seq, u32 tail, u32 flags, int op_flags)
668 {
669 struct gfs2_log_header *lh;
670 u32 hash, crc;
671 struct page *page = mempool_alloc(gfs2_page_pool, GFP_NOIO);
672 struct gfs2_statfs_change_host *l_sc = &sdp->sd_statfs_local;
673 struct timespec64 tv;
674 struct super_block *sb = sdp->sd_vfs;
675 u64 addr;
676
677 lh = page_address(page);
678 clear_page(lh);
679
680 lh->lh_header.mh_magic = cpu_to_be32(GFS2_MAGIC);
681 lh->lh_header.mh_type = cpu_to_be32(GFS2_METATYPE_LH);
682 lh->lh_header.__pad0 = cpu_to_be64(0);
683 lh->lh_header.mh_format = cpu_to_be32(GFS2_FORMAT_LH);
684 lh->lh_header.mh_jid = cpu_to_be32(sdp->sd_jdesc->jd_jid);
685 lh->lh_sequence = cpu_to_be64(seq);
686 lh->lh_flags = cpu_to_be32(flags);
687 lh->lh_tail = cpu_to_be32(tail);
688 lh->lh_blkno = cpu_to_be32(sdp->sd_log_flush_head);
689 hash = ~crc32(~0, lh, LH_V1_SIZE);
690 lh->lh_hash = cpu_to_be32(hash);
691
692 tv = current_kernel_time64();
693 lh->lh_nsec = cpu_to_be32(tv.tv_nsec);
694 lh->lh_sec = cpu_to_be64(tv.tv_sec);
695 addr = gfs2_log_bmap(sdp);
696 lh->lh_addr = cpu_to_be64(addr);
697 lh->lh_jinode = cpu_to_be64(GFS2_I(jd->jd_inode)->i_no_addr);
698
699 /* We may only write local statfs, quota, etc., when writing to our
700 own journal. The values are left 0 when recovering a journal
701 different from our own. */
702 if (!(flags & GFS2_LOG_HEAD_RECOVERY)) {
703 lh->lh_statfs_addr =
704 cpu_to_be64(GFS2_I(sdp->sd_sc_inode)->i_no_addr);
705 lh->lh_quota_addr =
706 cpu_to_be64(GFS2_I(sdp->sd_qc_inode)->i_no_addr);
707
708 spin_lock(&sdp->sd_statfs_spin);
709 lh->lh_local_total = cpu_to_be64(l_sc->sc_total);
710 lh->lh_local_free = cpu_to_be64(l_sc->sc_free);
711 lh->lh_local_dinodes = cpu_to_be64(l_sc->sc_dinodes);
712 spin_unlock(&sdp->sd_statfs_spin);
713 }
714
715 BUILD_BUG_ON(offsetof(struct gfs2_log_header, lh_crc) != LH_V1_SIZE);
716
> 717 crc = crc32c(~0, (void *)lh + LH_V1_SIZE + 4,
718 sb->s_blocksize - LH_V1_SIZE - 4);
719 lh->lh_crc = cpu_to_be32(crc);
720
721 gfs2_log_write(sdp, page, sb->s_blocksize, 0, addr);
722 gfs2_log_flush_bio(sdp, REQ_OP_WRITE, op_flags);
723 log_flush_wait(sdp);
724 }
725
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (31834 bytes)
Powered by blists - more mailing lists