Merge branch 'for-5.10/block' into for-5.10/drivers
* for-5.10/block: (140 commits)
bdi: replace BDI_CAP_NO_{WRITEBACK,ACCT_DIRTY} with a single flag
bdi: invert BDI_CAP_NO_ACCT_WB
bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag
mm: use SWP_SYNCHRONOUS_IO more intelligently
bdi: remove BDI_CAP_SYNCHRONOUS_IO
bdi: remove BDI_CAP_CGROUP_WRITEBACK
block: lift setting the readahead size into the block layer
md: update the optimal I/O size on reshape
bdi: initialize ->ra_pages and ->io_pages in bdi_init
aoe: set an optimal I/O size
bcache: inherit the optimal I/O size
drbd: remove dead code in device_to_statistics
fs: remove the unused SB_I_MULTIROOT flag
block: mark blkdev_get static
PM: mm: cleanup swsusp_swap_check
mm: split swap_type_of
PM: rewrite is_hibernate_resume_dev to not require an inode
mm: cleanup claim_swapfile
ocfs2: cleanup o2hb_region_dev_store
dasd: cleanup dasd_scan_partitions
...
This commit is contained in:
commit
ac8f7a0264
117 changed files with 2652 additions and 2083 deletions
|
|
@ -110,33 +110,14 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
|
|||
/*
|
||||
* Flags in backing_dev_info::capability
|
||||
*
|
||||
* The first three flags control whether dirty pages will contribute to the
|
||||
* VM's accounting and whether writepages() should be called for dirty pages
|
||||
* (something that would not, for example, be appropriate for ramfs)
|
||||
*
|
||||
* WARNING: these flags are closely related and should not normally be
|
||||
* used separately. The BDI_CAP_NO_ACCT_AND_WRITEBACK combines these
|
||||
* three flags into a single convenience macro.
|
||||
*
|
||||
* BDI_CAP_NO_ACCT_DIRTY: Dirty pages shouldn't contribute to accounting
|
||||
* BDI_CAP_NO_WRITEBACK: Don't write pages back
|
||||
* BDI_CAP_NO_ACCT_WB: Don't automatically account writeback pages
|
||||
* BDI_CAP_STRICTLIMIT: Keep number of dirty pages below bdi threshold.
|
||||
*
|
||||
* BDI_CAP_CGROUP_WRITEBACK: Supports cgroup-aware writeback.
|
||||
* BDI_CAP_SYNCHRONOUS_IO: Device is so fast that asynchronous IO would be
|
||||
* inefficient.
|
||||
* BDI_CAP_WRITEBACK: Supports dirty page writeback, and dirty pages
|
||||
* should contribute to accounting
|
||||
* BDI_CAP_WRITEBACK_ACCT: Automatically account writeback pages
|
||||
* BDI_CAP_STRICTLIMIT: Keep number of dirty pages below bdi threshold
|
||||
*/
|
||||
#define BDI_CAP_NO_ACCT_DIRTY 0x00000001
|
||||
#define BDI_CAP_NO_WRITEBACK 0x00000002
|
||||
#define BDI_CAP_NO_ACCT_WB 0x00000004
|
||||
#define BDI_CAP_STABLE_WRITES 0x00000008
|
||||
#define BDI_CAP_STRICTLIMIT 0x00000010
|
||||
#define BDI_CAP_CGROUP_WRITEBACK 0x00000020
|
||||
#define BDI_CAP_SYNCHRONOUS_IO 0x00000040
|
||||
|
||||
#define BDI_CAP_NO_ACCT_AND_WRITEBACK \
|
||||
(BDI_CAP_NO_WRITEBACK | BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_ACCT_WB)
|
||||
#define BDI_CAP_WRITEBACK (1 << 0)
|
||||
#define BDI_CAP_WRITEBACK_ACCT (1 << 1)
|
||||
#define BDI_CAP_STRICTLIMIT (1 << 2)
|
||||
|
||||
extern struct backing_dev_info noop_backing_dev_info;
|
||||
|
||||
|
|
@ -175,41 +156,9 @@ static inline int wb_congested(struct bdi_writeback *wb, int cong_bits)
|
|||
long congestion_wait(int sync, long timeout);
|
||||
long wait_iff_congested(int sync, long timeout);
|
||||
|
||||
static inline bool bdi_cap_synchronous_io(struct backing_dev_info *bdi)
|
||||
static inline bool mapping_can_writeback(struct address_space *mapping)
|
||||
{
|
||||
return bdi->capabilities & BDI_CAP_SYNCHRONOUS_IO;
|
||||
}
|
||||
|
||||
static inline bool bdi_cap_stable_pages_required(struct backing_dev_info *bdi)
|
||||
{
|
||||
return bdi->capabilities & BDI_CAP_STABLE_WRITES;
|
||||
}
|
||||
|
||||
static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi)
|
||||
{
|
||||
return !(bdi->capabilities & BDI_CAP_NO_WRITEBACK);
|
||||
}
|
||||
|
||||
static inline bool bdi_cap_account_dirty(struct backing_dev_info *bdi)
|
||||
{
|
||||
return !(bdi->capabilities & BDI_CAP_NO_ACCT_DIRTY);
|
||||
}
|
||||
|
||||
static inline bool bdi_cap_account_writeback(struct backing_dev_info *bdi)
|
||||
{
|
||||
/* Paranoia: BDI_CAP_NO_WRITEBACK implies BDI_CAP_NO_ACCT_WB */
|
||||
return !(bdi->capabilities & (BDI_CAP_NO_ACCT_WB |
|
||||
BDI_CAP_NO_WRITEBACK));
|
||||
}
|
||||
|
||||
static inline bool mapping_cap_writeback_dirty(struct address_space *mapping)
|
||||
{
|
||||
return bdi_cap_writeback_dirty(inode_to_bdi(mapping->host));
|
||||
}
|
||||
|
||||
static inline bool mapping_cap_account_dirty(struct address_space *mapping)
|
||||
{
|
||||
return bdi_cap_account_dirty(inode_to_bdi(mapping->host));
|
||||
return inode_to_bdi(mapping->host)->capabilities & BDI_CAP_WRITEBACK;
|
||||
}
|
||||
|
||||
static inline int bdi_sched_wait(void *word)
|
||||
|
|
@ -233,9 +182,9 @@ int inode_congested(struct inode *inode, int cong_bits);
|
|||
* inode_cgwb_enabled - test whether cgroup writeback is enabled on an inode
|
||||
* @inode: inode of interest
|
||||
*
|
||||
* cgroup writeback requires support from both the bdi and filesystem.
|
||||
* Also, both memcg and iocg have to be on the default hierarchy. Test
|
||||
* whether all conditions are met.
|
||||
* Cgroup writeback requires support from the filesystem. Also, both memcg and
|
||||
* iocg have to be on the default hierarchy. Test whether all conditions are
|
||||
* met.
|
||||
*
|
||||
* Note that the test result may change dynamically on the same inode
|
||||
* depending on how memcg and iocg are configured.
|
||||
|
|
@ -246,8 +195,7 @@ static inline bool inode_cgwb_enabled(struct inode *inode)
|
|||
|
||||
return cgroup_subsys_on_dfl(memory_cgrp_subsys) &&
|
||||
cgroup_subsys_on_dfl(io_cgrp_subsys) &&
|
||||
bdi_cap_account_dirty(bdi) &&
|
||||
(bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) &&
|
||||
(bdi->capabilities & BDI_CAP_WRITEBACK) &&
|
||||
(inode->i_sb->s_iflags & SB_I_CGROUPWB);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,6 +139,10 @@ struct blk_mq_hw_ctx {
|
|||
* shared across request queues.
|
||||
*/
|
||||
atomic_t nr_active;
|
||||
/**
|
||||
* @elevator_queued: Number of queued requests on hctx.
|
||||
*/
|
||||
atomic_t elevator_queued;
|
||||
|
||||
/** @cpuhp_online: List to store request if CPU is going to die */
|
||||
struct hlist_node cpuhp_online;
|
||||
|
|
@ -231,6 +235,9 @@ enum hctx_type {
|
|||
* @flags: Zero or more BLK_MQ_F_* flags.
|
||||
* @driver_data: Pointer to data owned by the block driver that created this
|
||||
* tag set.
|
||||
* @__bitmap_tags: A shared tags sbitmap, used over all hctx's
|
||||
* @__breserved_tags:
|
||||
* A shared reserved tags sbitmap, used over all hctx's
|
||||
* @tags: Tag sets. One tag set per hardware queue. Has @nr_hw_queues
|
||||
* elements.
|
||||
* @tag_list_lock: Serializes tag_list accesses.
|
||||
|
|
@ -249,7 +256,10 @@ struct blk_mq_tag_set {
|
|||
unsigned int timeout;
|
||||
unsigned int flags;
|
||||
void *driver_data;
|
||||
atomic_t active_queues_shared_sbitmap;
|
||||
|
||||
struct sbitmap_queue __bitmap_tags;
|
||||
struct sbitmap_queue __breserved_tags;
|
||||
struct blk_mq_tags **tags;
|
||||
|
||||
struct mutex tag_list_lock;
|
||||
|
|
@ -378,12 +388,13 @@ struct blk_mq_ops {
|
|||
|
||||
enum {
|
||||
BLK_MQ_F_SHOULD_MERGE = 1 << 0,
|
||||
BLK_MQ_F_TAG_SHARED = 1 << 1,
|
||||
BLK_MQ_F_TAG_QUEUE_SHARED = 1 << 1,
|
||||
/*
|
||||
* Set when this device requires underlying blk-mq device for
|
||||
* completing IO:
|
||||
*/
|
||||
BLK_MQ_F_STACKING = 1 << 2,
|
||||
BLK_MQ_F_TAG_HCTX_SHARED = 1 << 3,
|
||||
BLK_MQ_F_BLOCKING = 1 << 5,
|
||||
BLK_MQ_F_NO_SCHED = 1 << 6,
|
||||
BLK_MQ_F_ALLOC_POLICY_START_BIT = 8,
|
||||
|
|
@ -489,8 +500,6 @@ void blk_mq_kick_requeue_list(struct request_queue *q);
|
|||
void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs);
|
||||
void blk_mq_complete_request(struct request *rq);
|
||||
bool blk_mq_complete_request_remote(struct request *rq);
|
||||
bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list,
|
||||
struct bio *bio, unsigned int nr_segs);
|
||||
bool blk_mq_queue_stopped(struct request_queue *q);
|
||||
void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx);
|
||||
void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ typedef void (bio_end_io_t) (struct bio *);
|
|||
struct bio_crypt_ctx;
|
||||
|
||||
struct block_device {
|
||||
dev_t bd_dev; /* not a kdev_t - it's a search key */
|
||||
dev_t bd_dev;
|
||||
int bd_openers;
|
||||
struct inode * bd_inode; /* will die */
|
||||
struct super_block * bd_super;
|
||||
|
|
@ -37,7 +37,8 @@ struct block_device {
|
|||
struct hd_struct * bd_part;
|
||||
/* number of times partitions within this device have been opened. */
|
||||
unsigned bd_part_count;
|
||||
int bd_invalidated;
|
||||
|
||||
spinlock_t bd_size_lock; /* for bd_inode->i_size updates */
|
||||
struct gendisk * bd_disk;
|
||||
struct backing_dev_info *bd_bdi;
|
||||
|
||||
|
|
@ -255,8 +256,6 @@ enum {
|
|||
BIO_NO_PAGE_REF, /* don't put release vec pages */
|
||||
BIO_CLONED, /* doesn't own data */
|
||||
BIO_BOUNCED, /* bio is a bounce bio */
|
||||
BIO_USER_MAPPED, /* contains user pages */
|
||||
BIO_NULL_MAPPED, /* contains invalid user pages */
|
||||
BIO_WORKINGSET, /* contains userspace workingset pages */
|
||||
BIO_QUIET, /* Make BIO Quiet */
|
||||
BIO_CHAIN, /* chained bio, ->bi_remaining in effect */
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/percpu-refcount.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/blkzoned.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
struct module;
|
||||
struct scsi_ioctl_command;
|
||||
|
|
@ -458,7 +459,7 @@ struct request_queue {
|
|||
|
||||
#ifdef CONFIG_PM
|
||||
struct device *dev;
|
||||
int rpm_status;
|
||||
enum rpm_status rpm_status;
|
||||
unsigned int nr_pending;
|
||||
#endif
|
||||
|
||||
|
|
@ -484,6 +485,8 @@ struct request_queue {
|
|||
struct timer_list timeout;
|
||||
struct work_struct timeout_work;
|
||||
|
||||
atomic_t nr_active_requests_shared_sbitmap;
|
||||
|
||||
struct list_head icq_list;
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
DECLARE_BITMAP (blkcg_pols, BLKCG_MAX_POLS);
|
||||
|
|
@ -603,6 +606,7 @@ struct request_queue {
|
|||
#define QUEUE_FLAG_SAME_FORCE 12 /* force complete on same CPU */
|
||||
#define QUEUE_FLAG_DEAD 13 /* queue tear-down finished */
|
||||
#define QUEUE_FLAG_INIT_DONE 14 /* queue is initialized */
|
||||
#define QUEUE_FLAG_STABLE_WRITES 15 /* don't modify blks until WB is done */
|
||||
#define QUEUE_FLAG_POLL 16 /* IO polling enabled if set */
|
||||
#define QUEUE_FLAG_WC 17 /* Write back caching */
|
||||
#define QUEUE_FLAG_FUA 18 /* device supports FUA writes */
|
||||
|
|
@ -615,6 +619,7 @@ struct request_queue {
|
|||
#define QUEUE_FLAG_PCI_P2PDMA 25 /* device supports PCI p2p requests */
|
||||
#define QUEUE_FLAG_ZONE_RESETALL 26 /* supports Zone Reset All */
|
||||
#define QUEUE_FLAG_RQ_ALLOC_TIME 27 /* record rq->alloc_time_ns */
|
||||
#define QUEUE_FLAG_HCTX_ACTIVE 28 /* at least one blk-mq hctx is active */
|
||||
|
||||
#define QUEUE_FLAG_MQ_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
|
||||
(1 << QUEUE_FLAG_SAME_COMP))
|
||||
|
|
@ -631,6 +636,8 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q);
|
|||
#define blk_queue_noxmerges(q) \
|
||||
test_bit(QUEUE_FLAG_NOXMERGES, &(q)->queue_flags)
|
||||
#define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags)
|
||||
#define blk_queue_stable_writes(q) \
|
||||
test_bit(QUEUE_FLAG_STABLE_WRITES, &(q)->queue_flags)
|
||||
#define blk_queue_io_stat(q) test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags)
|
||||
#define blk_queue_add_random(q) test_bit(QUEUE_FLAG_ADD_RANDOM, &(q)->queue_flags)
|
||||
#define blk_queue_discard(q) test_bit(QUEUE_FLAG_DISCARD, &(q)->queue_flags)
|
||||
|
|
@ -1059,11 +1066,17 @@ static inline unsigned int blk_queue_get_max_sectors(struct request_queue *q,
|
|||
static inline unsigned int blk_max_size_offset(struct request_queue *q,
|
||||
sector_t offset)
|
||||
{
|
||||
if (!q->limits.chunk_sectors)
|
||||
unsigned int chunk_sectors = q->limits.chunk_sectors;
|
||||
|
||||
if (!chunk_sectors)
|
||||
return q->limits.max_sectors;
|
||||
|
||||
return min(q->limits.max_sectors, (unsigned int)(q->limits.chunk_sectors -
|
||||
(offset & (q->limits.chunk_sectors - 1))));
|
||||
if (likely(is_power_of_2(chunk_sectors)))
|
||||
chunk_sectors -= offset & (chunk_sectors - 1);
|
||||
else
|
||||
chunk_sectors -= sector_div(offset, chunk_sectors);
|
||||
|
||||
return min(q->limits.max_sectors, chunk_sectors);
|
||||
}
|
||||
|
||||
static inline unsigned int blk_rq_get_max_sectors(struct request *rq,
|
||||
|
|
@ -1130,6 +1143,7 @@ extern void blk_queue_max_zone_append_sectors(struct request_queue *q,
|
|||
extern void blk_queue_physical_block_size(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_alignment_offset(struct request_queue *q,
|
||||
unsigned int alignment);
|
||||
void blk_queue_update_readahead(struct request_queue *q);
|
||||
extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min);
|
||||
extern void blk_queue_io_min(struct request_queue *q, unsigned int min);
|
||||
extern void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt);
|
||||
|
|
@ -1455,10 +1469,9 @@ static inline int bdev_alignment_offset(struct block_device *bdev)
|
|||
|
||||
if (q->limits.misaligned)
|
||||
return -1;
|
||||
|
||||
if (bdev != bdev->bd_contains)
|
||||
return bdev->bd_part->alignment_offset;
|
||||
|
||||
return queue_limit_alignment_offset(&q->limits,
|
||||
bdev->bd_part->start_sect);
|
||||
return q->limits.alignment_offset;
|
||||
}
|
||||
|
||||
|
|
@ -1498,8 +1511,8 @@ static inline int bdev_discard_alignment(struct block_device *bdev)
|
|||
struct request_queue *q = bdev_get_queue(bdev);
|
||||
|
||||
if (bdev != bdev->bd_contains)
|
||||
return bdev->bd_part->discard_alignment;
|
||||
|
||||
return queue_limit_discard_alignment(&q->limits,
|
||||
bdev->bd_part->start_sect);
|
||||
return q->limits.discard_alignment;
|
||||
}
|
||||
|
||||
|
|
@ -1930,6 +1943,11 @@ unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
|
|||
void disk_end_io_acct(struct gendisk *disk, unsigned int op,
|
||||
unsigned long start_time);
|
||||
|
||||
unsigned long part_start_io_acct(struct gendisk *disk, struct hd_struct **part,
|
||||
struct bio *bio);
|
||||
void part_end_io_acct(struct hd_struct *part, struct bio *bio,
|
||||
unsigned long start_time);
|
||||
|
||||
/**
|
||||
* bio_start_io_acct - start I/O accounting for bio based drivers
|
||||
* @bio: bio to start account for
|
||||
|
|
@ -1967,7 +1985,6 @@ void blkdev_show(struct seq_file *seqf, off_t offset);
|
|||
#define BLKDEV_MAJOR_MAX 0
|
||||
#endif
|
||||
|
||||
int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder);
|
||||
struct block_device *blkdev_get_by_path(const char *path, fmode_t mode,
|
||||
void *holder);
|
||||
struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, void *holder);
|
||||
|
|
@ -1984,11 +2001,18 @@ void bdput(struct block_device *);
|
|||
|
||||
#ifdef CONFIG_BLOCK
|
||||
void invalidate_bdev(struct block_device *bdev);
|
||||
int truncate_bdev_range(struct block_device *bdev, fmode_t mode, loff_t lstart,
|
||||
loff_t lend);
|
||||
int sync_blockdev(struct block_device *bdev);
|
||||
#else
|
||||
static inline void invalidate_bdev(struct block_device *bdev)
|
||||
{
|
||||
}
|
||||
static inline int truncate_bdev_range(struct block_device *bdev, fmode_t mode,
|
||||
loff_t lstart, loff_t lend)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int sync_blockdev(struct block_device *bdev)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1385,7 +1385,7 @@ extern int send_sigurg(struct fown_struct *fown);
|
|||
#define SB_I_CGROUPWB 0x00000001 /* cgroup-aware writeback enabled */
|
||||
#define SB_I_NOEXEC 0x00000002 /* Ignore executables on this fs */
|
||||
#define SB_I_NODEV 0x00000004 /* Ignore devices on this fs */
|
||||
#define SB_I_MULTIROOT 0x00000008 /* Multiple roots to the dentry tree */
|
||||
#define SB_I_STABLE_WRITES 0x00000008 /* don't modify blks until WB is done */
|
||||
|
||||
/* sb->s_iflags to limit user namespace mounts */
|
||||
#define SB_I_USERNS_VISIBLE 0x00000010 /* fstype already mounted */
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ struct hd_struct {
|
|||
struct disk_stats __percpu *dkstats;
|
||||
struct percpu_ref ref;
|
||||
|
||||
sector_t alignment_offset;
|
||||
unsigned int discard_alignment;
|
||||
struct device __dev;
|
||||
struct kobject *holder_dir;
|
||||
int policy, partno;
|
||||
|
|
@ -193,6 +191,8 @@ struct gendisk {
|
|||
void *private_data;
|
||||
|
||||
int flags;
|
||||
unsigned long state;
|
||||
#define GD_NEED_PART_SCAN 0
|
||||
struct rw_semaphore lookup_sem;
|
||||
struct kobject *slave_dir;
|
||||
|
||||
|
|
@ -315,9 +315,8 @@ static inline int get_disk_ro(struct gendisk *disk)
|
|||
extern void disk_block_events(struct gendisk *disk);
|
||||
extern void disk_unblock_events(struct gendisk *disk);
|
||||
extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
|
||||
extern void set_capacity_revalidate_and_notify(struct gendisk *disk,
|
||||
sector_t size, bool revalidate);
|
||||
extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask);
|
||||
void set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size,
|
||||
bool update_bdev);
|
||||
|
||||
/* drivers/char/random.c */
|
||||
extern void add_disk_randomness(struct gendisk *disk) __latent_entropy;
|
||||
|
|
@ -372,10 +371,10 @@ extern void blk_unregister_region(dev_t devt, unsigned long range);
|
|||
int register_blkdev(unsigned int major, const char *name);
|
||||
void unregister_blkdev(unsigned int major, const char *name);
|
||||
|
||||
int revalidate_disk(struct gendisk *disk);
|
||||
int check_disk_change(struct block_device *bdev);
|
||||
void revalidate_disk_size(struct gendisk *disk, bool verbose);
|
||||
bool bdev_check_media_change(struct block_device *bdev);
|
||||
int __invalidate_device(struct block_device *bdev, bool kill_dirty);
|
||||
void bd_set_size(struct block_device *bdev, loff_t size);
|
||||
void bd_set_nr_sectors(struct block_device *bdev, sector_t sectors);
|
||||
|
||||
/* for drivers/char/raw.c: */
|
||||
int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long);
|
||||
|
|
|
|||
|
|
@ -490,8 +490,6 @@ enum {
|
|||
IDE_DFLAG_NOPROBE = BIT(9),
|
||||
/* need to do check_media_change() */
|
||||
IDE_DFLAG_REMOVABLE = BIT(10),
|
||||
/* needed for removable devices */
|
||||
IDE_DFLAG_ATTACH = BIT(11),
|
||||
IDE_DFLAG_FORCED_GEOM = BIT(12),
|
||||
/* disallow setting unmask bit */
|
||||
IDE_DFLAG_NO_UNMASK = BIT(13),
|
||||
|
|
|
|||
|
|
@ -473,9 +473,9 @@ static inline int hibernate_quiet_exec(int (*func)(void *data), void *data) {
|
|||
#endif /* CONFIG_HIBERNATION */
|
||||
|
||||
#ifdef CONFIG_HIBERNATION_SNAPSHOT_DEV
|
||||
int is_hibernate_resume_dev(const struct inode *);
|
||||
int is_hibernate_resume_dev(dev_t dev);
|
||||
#else
|
||||
static inline int is_hibernate_resume_dev(const struct inode *i) { return 0; }
|
||||
static inline int is_hibernate_resume_dev(dev_t dev) { return 0; }
|
||||
#endif
|
||||
|
||||
/* Hibernation and suspend events */
|
||||
|
|
|
|||
|
|
@ -467,7 +467,8 @@ extern int swapcache_prepare(swp_entry_t);
|
|||
extern void swap_free(swp_entry_t);
|
||||
extern void swapcache_free_entries(swp_entry_t *entries, int n);
|
||||
extern int free_swap_and_cache(swp_entry_t);
|
||||
extern int swap_type_of(dev_t, sector_t, struct block_device **);
|
||||
int swap_type_of(dev_t device, sector_t offset);
|
||||
int find_first_swap(dev_t *device);
|
||||
extern unsigned int count_swap_pages(int, int);
|
||||
extern sector_t map_swap_page(struct page *, struct block_device **);
|
||||
extern sector_t swapdev_block(int, pgoff_t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue