Skip to content

Commit

Permalink
Merge tag 'xfs-5.17-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/x…
Browse files Browse the repository at this point in the history
…fs-linux

Pull xfs fixes from Darrick Wong:
 "One of the patches removes some dead code from xfs_ioctl32.h and the
  other fixes broken workqueue flushing in the inode garbage collector.

   - Minor cleanup of ioctl32 cruft

   - Clean up open coded inodegc workqueue function calls"

* tag 'xfs-5.17-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: flush inodegc workqueue tasks before cancel
  xfs: remove unused xfs_ioctl32.h declarations
  • Loading branch information
torvalds committed Jan 22, 2022
2 parents 7fd350f + 6191cf3 commit 1cb69c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 36 deletions.
22 changes: 4 additions & 18 deletions fs/xfs/xfs_icache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1854,28 +1854,20 @@ xfs_inodegc_worker(
}

/*
* Force all currently queued inode inactivation work to run immediately, and
* wait for the work to finish. Two pass - queue all the work first pass, wait
* for it in a second pass.
* Force all currently queued inode inactivation work to run immediately and
* wait for the work to finish.
*/
void
xfs_inodegc_flush(
struct xfs_mount *mp)
{
struct xfs_inodegc *gc;
int cpu;

if (!xfs_is_inodegc_enabled(mp))
return;

trace_xfs_inodegc_flush(mp, __return_address);

xfs_inodegc_queue_all(mp);

for_each_online_cpu(cpu) {
gc = per_cpu_ptr(mp->m_inodegc, cpu);
flush_work(&gc->work);
}
flush_workqueue(mp->m_inodegc_wq);
}

/*
Expand All @@ -1886,18 +1878,12 @@ void
xfs_inodegc_stop(
struct xfs_mount *mp)
{
struct xfs_inodegc *gc;
int cpu;

if (!xfs_clear_inodegc_enabled(mp))
return;

xfs_inodegc_queue_all(mp);
drain_workqueue(mp->m_inodegc_wq);

for_each_online_cpu(cpu) {
gc = per_cpu_ptr(mp->m_inodegc, cpu);
cancel_work_sync(&gc->work);
}
trace_xfs_inodegc_stop(mp, __return_address);
}

Expand Down
18 changes: 0 additions & 18 deletions fs/xfs/xfs_ioctl32.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,6 @@ typedef struct compat_xfs_fsop_attrmulti_handlereq {
_IOW('X', 123, struct compat_xfs_fsop_attrmulti_handlereq)

#ifdef BROKEN_X86_ALIGNMENT
/* on ia32 l_start is on a 32-bit boundary */
typedef struct compat_xfs_flock64 {
__s16 l_type;
__s16 l_whence;
__s64 l_start __attribute__((packed));
/* len == 0 means until end of file */
__s64 l_len __attribute__((packed));
__s32 l_sysid;
__u32 l_pid;
__s32 l_pad[4]; /* reserve area */
} compat_xfs_flock64_t;

#define XFS_IOC_RESVSP_32 _IOW('X', 40, struct compat_xfs_flock64)
#define XFS_IOC_UNRESVSP_32 _IOW('X', 41, struct compat_xfs_flock64)
#define XFS_IOC_RESVSP64_32 _IOW('X', 42, struct compat_xfs_flock64)
#define XFS_IOC_UNRESVSP64_32 _IOW('X', 43, struct compat_xfs_flock64)
#define XFS_IOC_ZERO_RANGE_32 _IOW('X', 57, struct compat_xfs_flock64)

typedef struct compat_xfs_fsop_geom_v1 {
__u32 blocksize; /* filesystem (data) block size */
__u32 rtextsize; /* realtime extent size */
Expand Down

0 comments on commit 1cb69c8

Please sign in to comment.