Christoph Hellwig <hch@xxxxxx> writes: > On Sun, Mar 23, 2025 at 01:17:08AM +0530, Ritesh Harjani wrote: > > [full quote deleted, can you please properly trim your replies?] > Sure. >> So, I guess we can shift IOMAP_F_SIZE_CHANGED and IOMAP_F_STALE by >> 1 bit. So it will all look like.. > > Let's create some more space to avoid this for the next round, e.g. Sure, that make sense. > count the core set flags from 31 down, and limit IOMAP_F_PRIVATE to a > single flag, which is how it is used. flags in struct iomap is of type u16. So will make core iomap flags starting from bit 15, moving downwards. Here is a diff of what I think you meant - let me know if this diff looks good to you? diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 02fe001feebb..68416b135151 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -78,6 +78,11 @@ struct vm_fault; #define IOMAP_F_ANON_WRITE (1U << 7) #define IOMAP_F_ATOMIC_BIO (1U << 8) +/* + * Flag reserved for file system specific usage + */ +#define IOMAP_F_PRIVATE (1U << 12) + /* * Flags set by the core iomap code during operations: * @@ -88,14 +93,8 @@ struct vm_fault; * range it covers needs to be remapped by the high level before the operation * can proceed. */ -#define IOMAP_F_SIZE_CHANGED (1U << 8) -#define IOMAP_F_STALE (1U << 9) - -/* - * Flags from 0x1000 up are for file system specific usage: - */ -#define IOMAP_F_PRIVATE (1U << 12) - +#define IOMAP_F_SIZE_CHANGED (1U << 14) +#define IOMAP_F_STALE (1U << 15) /* * Magic value for addr: (PS: I might be on transit / travel for some other work for a week. My reponses may be delayed.) -ritesh