diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-22 10:39:38 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-22 10:39:38 +0100 |
commit | 71f28d7e89bdd96f671959180ab78f9cce287927 (patch) | |
tree | 61379d90c1b89cdf60def60951289f2724494259 /include | |
parent | 34d4be79d78569e6800c6fc59bfeb8b7c0ea2f5b (diff) | |
parent | 129e3317a6b283cb7bb10eb8cb0f531b603893c0 (diff) | |
download | barebox-71f28d7e89bdd96f671959180ab78f9cce287927.tar.gz barebox-71f28d7e89bdd96f671959180ab78f9cce287927.tar.xz |
Merge branch 'for-next/ext4'
Diffstat (limited to 'include')
-rw-r--r-- | include/ata_drive.h | 4 | ||||
-rw-r--r-- | include/block.h | 15 | ||||
-rw-r--r-- | include/linux/types.h | 5 | ||||
-rw-r--r-- | include/progress.h | 6 |
4 files changed, 14 insertions, 16 deletions
diff --git a/include/ata_drive.h b/include/ata_drive.h index eae74db855..6b8915c9cb 100644 --- a/include/ata_drive.h +++ b/include/ata_drive.h @@ -115,8 +115,8 @@ struct ata_port; struct ata_port_operations { int (*init)(struct ata_port *port); - int (*read)(struct ata_port *port, void *buf, unsigned int block, int num_blocks); - int (*write)(struct ata_port *port, const void *buf, unsigned int block, int num_blocks); + int (*read)(struct ata_port *port, void *buf, sector_t block, blkcnt_t num_blocks); + int (*write)(struct ata_port *port, const void *buf, sector_t block, blkcnt_t num_blocks); int (*read_id)(struct ata_port *port, void *buf); int (*reset)(struct ata_port *port); }; diff --git a/include/block.h b/include/block.h index a1de266194..d3a154bf73 100644 --- a/include/block.h +++ b/include/block.h @@ -4,12 +4,13 @@ #include <driver.h> #include <linux/list.h> +#include <linux/types.h> struct block_device; struct block_device_ops { - int (*read)(struct block_device *, void *buf, int block, int num_blocks); - int (*write)(struct block_device *, const void *buf, int block, int num_blocks); + int (*read)(struct block_device *, void *buf, sector_t block, blkcnt_t num_blocks); + int (*write)(struct block_device *, const void *buf, sector_t block, blkcnt_t num_blocks); int (*flush)(struct block_device *); }; @@ -20,12 +21,12 @@ struct block_device { struct list_head list; struct block_device_ops *ops; int blockbits; - int num_blocks; + blkcnt_t num_blocks; int rdbufsize; int blkmask; - loff_t discard_start; - loff_t discard_size; + sector_t discard_start; + blkcnt_t discard_size; struct list_head buffered_blocks; struct list_head idle_blocks; @@ -40,8 +41,8 @@ extern struct list_head block_device_list; int blockdevice_register(struct block_device *blk); int blockdevice_unregister(struct block_device *blk); -int block_read(struct block_device *blk, void *buf, int block, int num_blocks); -int block_write(struct block_device *blk, void *buf, int block, int num_blocks); +int block_read(struct block_device *blk, void *buf, sector_t block, blkcnt_t num_blocks); +int block_write(struct block_device *blk, void *buf, sector_t block, blkcnt_t num_blocks); static inline int block_flush(struct block_device *blk) { diff --git a/include/linux/types.h b/include/linux/types.h index fa7684e31e..5716a4c92f 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -166,13 +166,8 @@ typedef __u32 __bitwise __wsum; * * blkcnt_t is the type of the inode's block count. */ -#ifdef CONFIG_LBDAF typedef u64 sector_t; typedef u64 blkcnt_t; -#else -typedef unsigned long sector_t; -typedef unsigned long blkcnt_t; -#endif /* * The type of an index into the pagecache. diff --git a/include/progress.h b/include/progress.h index 75aa9c4f86..50b15fb12b 100644 --- a/include/progress.h +++ b/include/progress.h @@ -2,15 +2,17 @@ #ifndef __PROGRSS_H #define __PROGRSS_H +#include <linux/types.h> + /* Initialize a progress bar. If max > 0 a one line progress * bar is printed where 'max' corresponds to 100%. If max == 0 * a multi line progress bar is printed. */ -void init_progression_bar(int max); +void init_progression_bar(loff_t max); /* update a progress bar to a new value. If now < 0 then a * spinner is printed. */ -void show_progress(int now); +void show_progress(loff_t now); #endif /* __PROGRSS_H */ |