f2fs.h (1ad71a27124caf0b68ddd3c92be01aa2b2a72b2a) f2fs.h (c4020b2da4c9e84d63e30ce5a85dc287507f0e60)
1/*
2 * fs/f2fs/f2fs.h
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 344 unchanged lines hidden (view full) ---

353 struct f2fs_move_range)
354#define F2FS_IOC_FLUSH_DEVICE _IOW(F2FS_IOCTL_MAGIC, 10, \
355 struct f2fs_flush_device)
356#define F2FS_IOC_GARBAGE_COLLECT_RANGE _IOW(F2FS_IOCTL_MAGIC, 11, \
357 struct f2fs_gc_range)
358#define F2FS_IOC_GET_FEATURES _IOR(F2FS_IOCTL_MAGIC, 12, __u32)
359#define F2FS_IOC_SET_PIN_FILE _IOW(F2FS_IOCTL_MAGIC, 13, __u32)
360#define F2FS_IOC_GET_PIN_FILE _IOR(F2FS_IOCTL_MAGIC, 14, __u32)
1/*
2 * fs/f2fs/f2fs.h
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 344 unchanged lines hidden (view full) ---

353 struct f2fs_move_range)
354#define F2FS_IOC_FLUSH_DEVICE _IOW(F2FS_IOCTL_MAGIC, 10, \
355 struct f2fs_flush_device)
356#define F2FS_IOC_GARBAGE_COLLECT_RANGE _IOW(F2FS_IOCTL_MAGIC, 11, \
357 struct f2fs_gc_range)
358#define F2FS_IOC_GET_FEATURES _IOR(F2FS_IOCTL_MAGIC, 12, __u32)
359#define F2FS_IOC_SET_PIN_FILE _IOW(F2FS_IOCTL_MAGIC, 13, __u32)
360#define F2FS_IOC_GET_PIN_FILE _IOR(F2FS_IOCTL_MAGIC, 14, __u32)
361#define F2FS_IOC_PRECACHE_EXTENTS _IO(F2FS_IOCTL_MAGIC, 15)
361
362#define F2FS_IOC_SET_ENCRYPTION_POLICY FS_IOC_SET_ENCRYPTION_POLICY
363#define F2FS_IOC_GET_ENCRYPTION_POLICY FS_IOC_GET_ENCRYPTION_POLICY
364#define F2FS_IOC_GET_ENCRYPTION_PWSALT FS_IOC_GET_ENCRYPTION_PWSALT
365
366/*
367 * should be same as XFS_IOC_GOINGDOWN.
368 * Flags for going down operation used by FS_IOC_GOINGDOWN

--- 179 unchanged lines hidden (view full) ---

548 F2FS_MAP_UNWRITTEN)
549
550struct f2fs_map_blocks {
551 block_t m_pblk;
552 block_t m_lblk;
553 unsigned int m_len;
554 unsigned int m_flags;
555 pgoff_t *m_next_pgofs; /* point next possible non-hole pgofs */
362
363#define F2FS_IOC_SET_ENCRYPTION_POLICY FS_IOC_SET_ENCRYPTION_POLICY
364#define F2FS_IOC_GET_ENCRYPTION_POLICY FS_IOC_GET_ENCRYPTION_POLICY
365#define F2FS_IOC_GET_ENCRYPTION_PWSALT FS_IOC_GET_ENCRYPTION_PWSALT
366
367/*
368 * should be same as XFS_IOC_GOINGDOWN.
369 * Flags for going down operation used by FS_IOC_GOINGDOWN

--- 179 unchanged lines hidden (view full) ---

549 F2FS_MAP_UNWRITTEN)
550
551struct f2fs_map_blocks {
552 block_t m_pblk;
553 block_t m_lblk;
554 unsigned int m_len;
555 unsigned int m_flags;
556 pgoff_t *m_next_pgofs; /* point next possible non-hole pgofs */
557 pgoff_t *m_next_extent; /* point to next possible extent */
556 int m_seg_type;
557};
558
559/* for flag in get_data_block */
560enum {
561 F2FS_GET_BLOCK_DEFAULT,
562 F2FS_GET_BLOCK_FIEMAP,
563 F2FS_GET_BLOCK_BMAP,
564 F2FS_GET_BLOCK_PRE_DIO,
565 F2FS_GET_BLOCK_PRE_AIO,
558 int m_seg_type;
559};
560
561/* for flag in get_data_block */
562enum {
563 F2FS_GET_BLOCK_DEFAULT,
564 F2FS_GET_BLOCK_FIEMAP,
565 F2FS_GET_BLOCK_BMAP,
566 F2FS_GET_BLOCK_PRE_DIO,
567 F2FS_GET_BLOCK_PRE_AIO,
568 F2FS_GET_BLOCK_PRECACHE,
566};
567
568/*
569 * i_advise uses FADVISE_XXX_BIT. We can add additional hints later.
570 */
571#define FADVISE_COLD_BIT 0x01
572#define FADVISE_LOST_PINO_BIT 0x02
573#define FADVISE_ENCRYPT_BIT 0x04

--- 1985 unchanged lines hidden (view full) ---

2559void truncate_data_blocks(struct dnode_of_data *dn);
2560int truncate_blocks(struct inode *inode, u64 from, bool lock);
2561int f2fs_truncate(struct inode *inode);
2562int f2fs_getattr(const struct path *path, struct kstat *stat,
2563 u32 request_mask, unsigned int flags);
2564int f2fs_setattr(struct dentry *dentry, struct iattr *attr);
2565int truncate_hole(struct inode *inode, pgoff_t pg_start, pgoff_t pg_end);
2566void truncate_data_blocks_range(struct dnode_of_data *dn, int count);
569};
570
571/*
572 * i_advise uses FADVISE_XXX_BIT. We can add additional hints later.
573 */
574#define FADVISE_COLD_BIT 0x01
575#define FADVISE_LOST_PINO_BIT 0x02
576#define FADVISE_ENCRYPT_BIT 0x04

--- 1985 unchanged lines hidden (view full) ---

2562void truncate_data_blocks(struct dnode_of_data *dn);
2563int truncate_blocks(struct inode *inode, u64 from, bool lock);
2564int f2fs_truncate(struct inode *inode);
2565int f2fs_getattr(const struct path *path, struct kstat *stat,
2566 u32 request_mask, unsigned int flags);
2567int f2fs_setattr(struct dentry *dentry, struct iattr *attr);
2568int truncate_hole(struct inode *inode, pgoff_t pg_start, pgoff_t pg_end);
2569void truncate_data_blocks_range(struct dnode_of_data *dn, int count);
2570int f2fs_precache_extents(struct inode *inode);
2567long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
2568long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
2569int f2fs_pin_file_control(struct inode *inode, bool inc);
2570
2571/*
2572 * inode.c
2573 */
2574void f2fs_set_inode_flags(struct inode *inode);

--- 670 unchanged lines hidden ---
2571long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
2572long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
2573int f2fs_pin_file_control(struct inode *inode, bool inc);
2574
2575/*
2576 * inode.c
2577 */
2578void f2fs_set_inode_flags(struct inode *inode);

--- 670 unchanged lines hidden ---