Files
linux/fs/ntfs/collate.h
Namjae Jeon 4079605199 ntfs: update in-memory, on-disk structures and headers
Update the NTFS filesystem driver's in-memory and on-disk structures:

  - Introduce the  infrastructure and initial support for reparse
    points and EA attribute.
  - Refactor the core ntfs_inode and ntfs_volume structures to support
    new features such as iomap.
  - Remove the unnecessary types.h and endian.h headers.
  - Reorganize the comments in headers for better readability, including
    fixing warnings from checkpatch.pl.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-02-19 21:48:06 +09:00

37 lines
953 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Defines for NTFS kernel collation handling.
*
* Copyright (c) 2004 Anton Altaparmakov
*
* Part of this file is based on code from the NTFS-3G.
* and is copyrighted by the respective authors below:
* Copyright (c) 2004 Anton Altaparmakov
* Copyright (c) 2005 Yura Pakhuchiy
*/
#ifndef _LINUX_NTFS_COLLATE_H
#define _LINUX_NTFS_COLLATE_H
#include "volume.h"
static inline bool ntfs_is_collation_rule_supported(__le32 cr)
{
int i;
if (unlikely(cr != COLLATION_BINARY && cr != COLLATION_NTOFS_ULONG &&
cr != COLLATION_FILE_NAME) && cr != COLLATION_NTOFS_ULONGS)
return false;
i = le32_to_cpu(cr);
if (likely(((i >= 0) && (i <= 0x02)) ||
((i >= 0x10) && (i <= 0x13))))
return true;
return false;
}
int ntfs_collate(struct ntfs_volume *vol, __le32 cr,
const void *data1, const u32 data1_len,
const void *data2, const u32 data2_len);
#endif /* _LINUX_NTFS_COLLATE_H */