xfs: fix old fuzz test invocations of xfs_repair
[xfstests-dev.git] / tests / xfs / 040.out
1 QA output created by 040
2 --- xfsprogs/libxfs/xfs_alloc.c
3 +++ kernel/libxfs/xfs_alloc.c
4 @@ -XXXX,X +YYYY,Y @@
5                 pag->pagf_refcount_level = be32_to_cpu(agf->agf_refcount_level);
6                 spin_lock_init(&pag->pagb_lock);
7                 pag->pagb_count = 0;
8 -               /* XXX: pagb_tree doesn't exist in userspace */
9 -               //pag->pagb_tree = RB_ROOT;
10 +               pag->pagb_tree = RB_ROOT;
11                 pag->pagf_init = 1;
12         }
13  #ifdef DEBUG
14 --- xfsprogs/libxfs/xfs_btree.c
15 +++ kernel/libxfs/xfs_btree.c
16 @@ -XXXX,X +YYYY,Y @@
17         return error;
18  }
19  
20 -#ifdef __KERNEL__
21  struct xfs_btree_split_args {
22         struct xfs_btree_cur    *cur;
23         int                     level;
24 @@ -XXXX,X +YYYY,Y @@
25         destroy_work_on_stack(&args.work);
26         return args.result;
27  }
28 -#else /* !KERNEL */
29 -#define xfs_btree_split        __xfs_btree_split
30 -#endif
31  
32  
33  /*
34 --- xfsprogs/libxfs/xfs_dir2_sf.c
35 +++ kernel/libxfs/xfs_dir2_sf.c
36 @@ -XXXX,X +YYYY,Y @@
37                  * Calculate the new size, see if we should give up yet.
38                  */
39                 size = xfs_dir2_sf_hdr_size(i8count) +  /* header */
40 -                      count * 3 * sizeof(__u8) +       /* namelen + offset */
41 +                      count * 3 * sizeof(u8) +         /* namelen + offset */
42                        namelen +                        /* name */
43                        (i8count ?                       /* inumber */
44                                 count * XFS_INO64_SIZE :
45 --- xfsprogs/libxfs/xfs_fs.h
46 +++ kernel/libxfs/xfs_fs.h
47 @@ -XXXX,X +YYYY,Y @@
48  #endif
49  
50  /*
51 - * Flags for the bs_xflags/fsx_xflags field in XFS_IOC_FS[GS]ETXATTR[A]
52 - * These are for backwards compatibility only. New code should
53 - * use the kernel [4.5 onwards] defined FS_XFLAG_* definitions directly.
54 - */
55 -#define        XFS_XFLAG_REALTIME      FS_XFLAG_REALTIME
56 -#define        XFS_XFLAG_PREALLOC      FS_XFLAG_PREALLOC
57 -#define        XFS_XFLAG_IMMUTABLE     FS_XFLAG_IMMUTABLE
58 -#define        XFS_XFLAG_APPEND        FS_XFLAG_APPEND
59 -#define        XFS_XFLAG_SYNC          FS_XFLAG_SYNC
60 -#define        XFS_XFLAG_NOATIME       FS_XFLAG_NOATIME
61 -#define        XFS_XFLAG_NODUMP        FS_XFLAG_NODUMP
62 -#define        XFS_XFLAG_RTINHERIT     FS_XFLAG_RTINHERIT
63 -#define        XFS_XFLAG_PROJINHERIT   FS_XFLAG_PROJINHERIT
64 -#define        XFS_XFLAG_NOSYMLINKS    FS_XFLAG_NOSYMLINKS
65 -#define        XFS_XFLAG_EXTSIZE       FS_XFLAG_EXTSIZE
66 -#define        XFS_XFLAG_EXTSZINHERIT  FS_XFLAG_EXTSZINHERIT
67 -#define        XFS_XFLAG_NODEFRAG      FS_XFLAG_NODEFRAG
68 -#define        XFS_XFLAG_FILESTREAM    FS_XFLAG_FILESTREAM
69 -#define        XFS_XFLAG_HASATTR       FS_XFLAG_HASATTR
70 -
71 -/*
72   * Structure for XFS_IOC_GETBMAP.
73   * On input, fill in bmv_offset and bmv_length of the first structure
74   * to indicate the area of interest in the file, and bmv_entries with
75 @@ -XXXX,X +YYYY,Y @@
76  #define XFS_IOC_GET_AG_RESBLKS      _IOR ('X', 126, struct xfs_fsop_ag_resblks)
77  /*     XFS_IOC_GETFSUUID ---------- deprecated 140      */
78  
79 -/* reflink ioctls; these MUST match the btrfs ioctl definitions */
80 -/* from struct btrfs_ioctl_clone_range_args */
81 -struct xfs_clone_args {
82 -       __s64 src_fd;
83 -       __u64 src_offset;
84 -       __u64 src_length;
85 -       __u64 dest_offset;
86 -};
87 -
88 -/* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */
89 -#define XFS_EXTENT_DATA_SAME   0
90 -#define XFS_EXTENT_DATA_DIFFERS        1
91 -
92 -/* from struct btrfs_ioctl_file_extent_same_info */
93 -struct xfs_extent_data_info {
94 -       __s64 fd;               /* in - destination file */
95 -       __u64 logical_offset;   /* in - start of extent in destination */
96 -       __u64 bytes_deduped;    /* out - total # of bytes we were able
97 -                                * to dedupe from this file */
98 -       /* status of this dedupe operation:
99 -        * < 0 for error
100 -        * == XFS_EXTENT_DATA_SAME if dedupe succeeds
101 -        * == XFS_EXTENT_DATA_DIFFERS if data differs
102 -        */
103 -       __s32 status;           /* out - see above description */
104 -       __u32 reserved;
105 -};
106 -
107 -/* from struct btrfs_ioctl_file_extent_same_args */
108 -struct xfs_extent_data {
109 -       __u64 logical_offset;   /* in - start of extent in source */
110 -       __u64 length;           /* in - length of extent */
111 -       __u16 dest_count;       /* in - total elements in info array */
112 -       __u16 reserved1;
113 -       __u32 reserved2;
114 -       struct xfs_extent_data_info info[0];
115 -};
116 -
117 -#define XFS_IOC_CLONE           _IOW (0x94, 9, int)
118 -#define XFS_IOC_CLONE_RANGE     _IOW (0x94, 13, struct xfs_clone_args)
119 -#define XFS_IOC_FILE_EXTENT_SAME _IOWR(0x94, 54, struct xfs_extent_data)
120  
121  #ifndef HAVE_BBMACROS
122  /*
123 --- xfsprogs/libxfs/xfs_inode_fork.c
124 +++ kernel/libxfs/xfs_inode_fork.c
125 @@ -XXXX,X +YYYY,Y @@
126         xfs_ifork_t     *ifp,           /* inode fork pointer */
127         int             new_size)       /* new indirection array size */
128  {
129 -#ifdef DEBUG
130         int             nlists;         /* number of irec's (ex lists) */
131         int             size;           /* current indirection array size */
132  
133 @@ -XXXX,X +YYYY,Y @@
134         size = nlists * sizeof(xfs_ext_irec_t);
135         ASSERT(ifp->if_real_bytes);
136         ASSERT((new_size >= 0) && (new_size != size));
137 -#endif
138         if (new_size == 0) {
139                 xfs_iext_destroy(ifp);
140         } else {
141 --- xfsprogs/libxfs/xfs_sb.c
142 +++ kernel/libxfs/xfs_sb.c
143 @@ -XXXX,X +YYYY,Y @@
144         }
145  
146         /*
147 +        * Until this is fixed only page-sized or smaller data blocks work.
148 +        */
149 +       if (unlikely(sbp->sb_blocksize > PAGE_SIZE)) {
150 +               xfs_warn(mp,
151 +               "File system with blocksize %d bytes. "
152 +               "Only pagesize (%ld) or less will currently work.",
153 +                               sbp->sb_blocksize, PAGE_SIZE);
154 +               return -ENOSYS;
155 +       }
156 +
157 +       /*
158          * Currently only very few inode sizes are supported.
159          */
160         switch (sbp->sb_inodesize) {
161 @@ -XXXX,X +YYYY,Y @@
162                 return -EFBIG;
163         }
164  
165 +       if (check_inprogress && sbp->sb_inprogress) {
166 +               xfs_warn(mp, "Offline file system operation in progress!");
167 +               return -EFSCORRUPTED;
168 +       }
169         return 0;
170  }
171