Loading fs/xfs/kmem.c +6 −4 Original line number Diff line number Diff line Loading @@ -55,8 +55,9 @@ kmem_alloc(size_t size, xfs_km_flags_t flags) return ptr; if (!(++retries % 100)) xfs_err(NULL, "possible memory allocation deadlock in %s (mode:0x%x)", __func__, lflags); "%s(%u) possible memory allocation deadlock size %u in %s (mode:0x%x)", current->comm, current->pid, (unsigned int)size, __func__, lflags); congestion_wait(BLK_RW_ASYNC, HZ/50); } while (1); } Loading Loading @@ -120,7 +121,8 @@ kmem_zone_alloc(kmem_zone_t *zone, xfs_km_flags_t flags) return ptr; if (!(++retries % 100)) xfs_err(NULL, "possible memory allocation deadlock in %s (mode:0x%x)", "%s(%u) possible memory allocation deadlock in %s (mode:0x%x)", current->comm, current->pid, __func__, lflags); congestion_wait(BLK_RW_ASYNC, HZ/50); } while (1); Loading fs/xfs/libxfs/xfs_attr_remote.c +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ xfs_attr3_rmt_verify( if (be32_to_cpu(rmt->rm_bytes) > fsbsize - sizeof(*rmt)) return false; if (be32_to_cpu(rmt->rm_offset) + be32_to_cpu(rmt->rm_bytes) > XATTR_SIZE_MAX) be32_to_cpu(rmt->rm_bytes) > XFS_XATTR_SIZE_MAX) return false; if (rmt->rm_owner == 0) return false; Loading fs/xfs/libxfs/xfs_btree.c +2 −2 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ xfs_btree_check_ptr( * long-form btree header. * * Prior to calculting the CRC, pull the LSN out of the buffer log item and put * it into the buffer so recovery knows what the last modifcation was that made * it into the buffer so recovery knows what the last modification was that made * it to disk. */ void Loading Loading @@ -261,7 +261,7 @@ xfs_btree_lblock_verify_crc( * short-form btree header. * * Prior to calculting the CRC, pull the LSN out of the buffer log item and put * it into the buffer so recovery knows what the last modifcation was that made * it into the buffer so recovery knows what the last modification was that made * it to disk. */ void Loading fs/xfs/libxfs/xfs_format.h +9 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,14 @@ struct xfs_ifork; #define XFS_SB_VERSION_BORGBIT 0x4000 /* ASCII only case-insens. */ #define XFS_SB_VERSION_MOREBITSBIT 0x8000 /* * The size of a single extended attribute on disk is limited by * the size of index values within the attribute entries themselves. * These are be16 fields, so we can only support attribute data * sizes up to 2^16 bytes in length. */ #define XFS_XATTR_SIZE_MAX (1 << 16) /* * Supported feature bit list is just all bits in the versionnum field because * we've used them all up and understand them all. Except, of course, for the Loading Loading @@ -1483,7 +1491,7 @@ struct xfs_acl { */ #define XFS_ACL_MAX_ENTRIES(mp) \ (xfs_sb_version_hascrc(&mp->m_sb) \ ? (XATTR_SIZE_MAX - sizeof(struct xfs_acl)) / \ ? (XFS_XATTR_SIZE_MAX - sizeof(struct xfs_acl)) / \ sizeof(struct xfs_acl_entry) \ : 25) Loading fs/xfs/libxfs/xfs_fs.h +10 −0 Original line number Diff line number Diff line Loading @@ -489,6 +489,16 @@ typedef struct xfs_swapext #define XFS_FSOP_GOING_FLAGS_LOGFLUSH 0x1 /* flush log but not data */ #define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */ /* * ioctl limits */ #ifdef XATTR_LIST_MAX # define XFS_XATTR_LIST_MAX XATTR_LIST_MAX #else # define XFS_XATTR_LIST_MAX 65536 #endif /* * ioctl commands that are used by Linux filesystems */ Loading Loading
fs/xfs/kmem.c +6 −4 Original line number Diff line number Diff line Loading @@ -55,8 +55,9 @@ kmem_alloc(size_t size, xfs_km_flags_t flags) return ptr; if (!(++retries % 100)) xfs_err(NULL, "possible memory allocation deadlock in %s (mode:0x%x)", __func__, lflags); "%s(%u) possible memory allocation deadlock size %u in %s (mode:0x%x)", current->comm, current->pid, (unsigned int)size, __func__, lflags); congestion_wait(BLK_RW_ASYNC, HZ/50); } while (1); } Loading Loading @@ -120,7 +121,8 @@ kmem_zone_alloc(kmem_zone_t *zone, xfs_km_flags_t flags) return ptr; if (!(++retries % 100)) xfs_err(NULL, "possible memory allocation deadlock in %s (mode:0x%x)", "%s(%u) possible memory allocation deadlock in %s (mode:0x%x)", current->comm, current->pid, __func__, lflags); congestion_wait(BLK_RW_ASYNC, HZ/50); } while (1); Loading
fs/xfs/libxfs/xfs_attr_remote.c +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ xfs_attr3_rmt_verify( if (be32_to_cpu(rmt->rm_bytes) > fsbsize - sizeof(*rmt)) return false; if (be32_to_cpu(rmt->rm_offset) + be32_to_cpu(rmt->rm_bytes) > XATTR_SIZE_MAX) be32_to_cpu(rmt->rm_bytes) > XFS_XATTR_SIZE_MAX) return false; if (rmt->rm_owner == 0) return false; Loading
fs/xfs/libxfs/xfs_btree.c +2 −2 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ xfs_btree_check_ptr( * long-form btree header. * * Prior to calculting the CRC, pull the LSN out of the buffer log item and put * it into the buffer so recovery knows what the last modifcation was that made * it into the buffer so recovery knows what the last modification was that made * it to disk. */ void Loading Loading @@ -261,7 +261,7 @@ xfs_btree_lblock_verify_crc( * short-form btree header. * * Prior to calculting the CRC, pull the LSN out of the buffer log item and put * it into the buffer so recovery knows what the last modifcation was that made * it into the buffer so recovery knows what the last modification was that made * it to disk. */ void Loading
fs/xfs/libxfs/xfs_format.h +9 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,14 @@ struct xfs_ifork; #define XFS_SB_VERSION_BORGBIT 0x4000 /* ASCII only case-insens. */ #define XFS_SB_VERSION_MOREBITSBIT 0x8000 /* * The size of a single extended attribute on disk is limited by * the size of index values within the attribute entries themselves. * These are be16 fields, so we can only support attribute data * sizes up to 2^16 bytes in length. */ #define XFS_XATTR_SIZE_MAX (1 << 16) /* * Supported feature bit list is just all bits in the versionnum field because * we've used them all up and understand them all. Except, of course, for the Loading Loading @@ -1483,7 +1491,7 @@ struct xfs_acl { */ #define XFS_ACL_MAX_ENTRIES(mp) \ (xfs_sb_version_hascrc(&mp->m_sb) \ ? (XATTR_SIZE_MAX - sizeof(struct xfs_acl)) / \ ? (XFS_XATTR_SIZE_MAX - sizeof(struct xfs_acl)) / \ sizeof(struct xfs_acl_entry) \ : 25) Loading
fs/xfs/libxfs/xfs_fs.h +10 −0 Original line number Diff line number Diff line Loading @@ -489,6 +489,16 @@ typedef struct xfs_swapext #define XFS_FSOP_GOING_FLAGS_LOGFLUSH 0x1 /* flush log but not data */ #define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */ /* * ioctl limits */ #ifdef XATTR_LIST_MAX # define XFS_XATTR_LIST_MAX XATTR_LIST_MAX #else # define XFS_XATTR_LIST_MAX 65536 #endif /* * ioctl commands that are used by Linux filesystems */ Loading