1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2019 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
6 * Ensure the kernel returns the new lastip even when ocount is null.
10 #include <sys/ioctl.h>
17 static void die(const char *tag)
23 int main(int argc, char *argv[])
25 struct xfs_bstat bstat;
27 struct xfs_fsop_bulkreq bulkreq = {
36 fd = open(argv[1], O_RDONLY);
41 ret = ioctl(fd, XFS_IOC_FSINUMBERS, &bulkreq);
46 printf("inumbers last = %llu\n", (unsigned long long)last);
49 ret = ioctl(fd, XFS_IOC_FSBULKSTAT, &bulkreq);
54 printf("bulkstat last = %llu\n", (unsigned long long)last);