mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 02:36:49 +07:00
0b166a57e6
* Fix performance problems found in dioread_nolock now that it is the default, caused by transaction leaks. * Clean up fiemap handling in ext4 * Clean up and refactor multiple block allocator (mballoc) code * Fix a problem with mballoc with a smaller file systems running out of blocks because they couldn't properly use blocks that had been reserved by inode preallocation. * Fixed a race in ext4_sync_parent() versus rename() * Simplify the error handling in the extent manipulation code * Make sure all metadata I/O errors are felected to ext4_ext_dirty()'s and ext4_make_inode_dirty()'s callers. * Avoid passing an error pointer to brelse in ext4_xattr_set() * Fix race which could result to freeing an inode on the dirty last in data=journal mode. * Fix refcount handling if ext4_iget() fails * Fix a crash in generic/019 caused by a corrupted extent node -----BEGIN PGP SIGNATURE----- iQEyBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAl7Ze8kACgkQ8vlZVpUN gaNChAf4xn0ytFSrweI/S2Sp05G/2L/ocZ2TZZk2ZdGeN1E+ABdSIv/zIF9zuFgZ /pY/C+fyEZWt4E3FlNO8gJzoEedkzMCMnUhSIfI+wZbcclyTOSNMJtnrnJKAEtVH HOvGZJmg357jy407RCGhZpJ773nwU2xhBTr5OFxvSf9mt/vzebxIOnw5D7HPlC1V Fgm6Du8q+tRrPsyjv1Yu4pUEVXMJ7qUcvt326AXVM3kCZO1Aa5GrURX0w3J4mzW1 tc1tKmtbLcVVYTo9CwHXhk/edbxrhAydSP2iACand3tK6IJuI6j9x+bBJnxXitnr vsxsfTYMG18+2SxrJ9LwmagqmrRq =HMTs -----END PGP SIGNATURE----- Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "A lot of bug fixes and cleanups for ext4, including: - Fix performance problems found in dioread_nolock now that it is the default, caused by transaction leaks. - Clean up fiemap handling in ext4 - Clean up and refactor multiple block allocator (mballoc) code - Fix a problem with mballoc with a smaller file systems running out of blocks because they couldn't properly use blocks that had been reserved by inode preallocation. - Fixed a race in ext4_sync_parent() versus rename() - Simplify the error handling in the extent manipulation code - Make sure all metadata I/O errors are felected to ext4_ext_dirty()'s and ext4_make_inode_dirty()'s callers. - Avoid passing an error pointer to brelse in ext4_xattr_set() - Fix race which could result to freeing an inode on the dirty last in data=journal mode. - Fix refcount handling if ext4_iget() fails - Fix a crash in generic/019 caused by a corrupted extent node" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (58 commits) ext4: avoid unnecessary transaction starts during writeback ext4: don't block for O_DIRECT if IOCB_NOWAIT is set ext4: remove the access_ok() check in ext4_ioctl_get_es_cache fs: remove the access_ok() check in ioctl_fiemap fs: handle FIEMAP_FLAG_SYNC in fiemap_prep fs: move fiemap range validation into the file systems instances iomap: fix the iomap_fiemap prototype fs: move the fiemap definitions out of fs.h fs: mark __generic_block_fiemap static ext4: remove the call to fiemap_check_flags in ext4_fiemap ext4: split _ext4_fiemap ext4: fix fiemap size checks for bitmap files ext4: fix EXT4_MAX_LOGICAL_BLOCK macro add comment for ext4_dir_entry_2 file_type member jbd2: avoid leaking transaction credits when unreserving handle ext4: drop ext4_journal_free_reserved() ext4: mballoc: use lock for checking free blocks while retrying ext4: mballoc: refactor ext4_mb_good_group() ext4: mballoc: introduce pcpu seqcnt for freeing PA to improve ENOSPC handling ext4: mballoc: refactor ext4_mb_discard_preallocations() ...
71 lines
2.7 KiB
C
71 lines
2.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
/*
|
|
* FS_IOC_FIEMAP ioctl infrastructure.
|
|
*
|
|
* Some portions copyright (C) 2007 Cluster File Systems, Inc
|
|
*
|
|
* Authors: Mark Fasheh <mfasheh@suse.com>
|
|
* Kalpak Shah <kalpak.shah@sun.com>
|
|
* Andreas Dilger <adilger@sun.com>
|
|
*/
|
|
|
|
#ifndef _UAPI_LINUX_FIEMAP_H
|
|
#define _UAPI_LINUX_FIEMAP_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct fiemap_extent {
|
|
__u64 fe_logical; /* logical offset in bytes for the start of
|
|
* the extent from the beginning of the file */
|
|
__u64 fe_physical; /* physical offset in bytes for the start
|
|
* of the extent from the beginning of the disk */
|
|
__u64 fe_length; /* length in bytes for this extent */
|
|
__u64 fe_reserved64[2];
|
|
__u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */
|
|
__u32 fe_reserved[3];
|
|
};
|
|
|
|
struct fiemap {
|
|
__u64 fm_start; /* logical offset (inclusive) at
|
|
* which to start mapping (in) */
|
|
__u64 fm_length; /* logical length of mapping which
|
|
* userspace wants (in) */
|
|
__u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */
|
|
__u32 fm_mapped_extents;/* number of extents that were mapped (out) */
|
|
__u32 fm_extent_count; /* size of fm_extents array (in) */
|
|
__u32 fm_reserved;
|
|
struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
|
|
};
|
|
|
|
#define FIEMAP_MAX_OFFSET (~0ULL)
|
|
|
|
#define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */
|
|
#define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */
|
|
#define FIEMAP_FLAG_CACHE 0x00000004 /* request caching of the extents */
|
|
|
|
#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
|
|
|
|
#define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */
|
|
#define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */
|
|
#define FIEMAP_EXTENT_DELALLOC 0x00000004 /* Location still pending.
|
|
* Sets EXTENT_UNKNOWN. */
|
|
#define FIEMAP_EXTENT_ENCODED 0x00000008 /* Data can not be read
|
|
* while fs is unmounted */
|
|
#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080 /* Data is encrypted by fs.
|
|
* Sets EXTENT_NO_BYPASS. */
|
|
#define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100 /* Extent offsets may not be
|
|
* block aligned. */
|
|
#define FIEMAP_EXTENT_DATA_INLINE 0x00000200 /* Data mixed with metadata.
|
|
* Sets EXTENT_NOT_ALIGNED.*/
|
|
#define FIEMAP_EXTENT_DATA_TAIL 0x00000400 /* Multiple files in block.
|
|
* Sets EXTENT_NOT_ALIGNED.*/
|
|
#define FIEMAP_EXTENT_UNWRITTEN 0x00000800 /* Space allocated, but
|
|
* no data (i.e. zero). */
|
|
#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively
|
|
* support extents. Result
|
|
* merged for efficiency. */
|
|
#define FIEMAP_EXTENT_SHARED 0x00002000 /* Space shared with other
|
|
* files. */
|
|
|
|
#endif /* _UAPI_LINUX_FIEMAP_H */
|