|
@@ -181,7 +181,7 @@ static const char *read_super(struct cache_sb *sb, struct block_device *bdev,
|
|
goto err;
|
|
goto err;
|
|
}
|
|
}
|
|
|
|
|
|
- sb->last_mount = get_seconds();
|
|
|
|
|
|
+ sb->last_mount = (u32)ktime_get_real_seconds();
|
|
err = NULL;
|
|
err = NULL;
|
|
|
|
|
|
get_page(bh->b_page);
|
|
get_page(bh->b_page);
|
|
@@ -701,7 +701,7 @@ static void bcache_device_detach(struct bcache_device *d)
|
|
|
|
|
|
SET_UUID_FLASH_ONLY(u, 0);
|
|
SET_UUID_FLASH_ONLY(u, 0);
|
|
memcpy(u->uuid, invalid_uuid, 16);
|
|
memcpy(u->uuid, invalid_uuid, 16);
|
|
- u->invalidated = cpu_to_le32(get_seconds());
|
|
|
|
|
|
+ u->invalidated = cpu_to_le32((u32)ktime_get_real_seconds());
|
|
bch_uuid_write(d->c);
|
|
bch_uuid_write(d->c);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1033,7 +1033,7 @@ void bch_cached_dev_detach(struct cached_dev *dc)
|
|
int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c,
|
|
int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c,
|
|
uint8_t *set_uuid)
|
|
uint8_t *set_uuid)
|
|
{
|
|
{
|
|
- uint32_t rtime = cpu_to_le32(get_seconds());
|
|
|
|
|
|
+ uint32_t rtime = cpu_to_le32((u32)ktime_get_real_seconds());
|
|
struct uuid_entry *u;
|
|
struct uuid_entry *u;
|
|
struct cached_dev *exist_dc, *t;
|
|
struct cached_dev *exist_dc, *t;
|
|
|
|
|
|
@@ -1076,7 +1076,7 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c,
|
|
(BDEV_STATE(&dc->sb) == BDEV_STATE_STALE ||
|
|
(BDEV_STATE(&dc->sb) == BDEV_STATE_STALE ||
|
|
BDEV_STATE(&dc->sb) == BDEV_STATE_NONE)) {
|
|
BDEV_STATE(&dc->sb) == BDEV_STATE_NONE)) {
|
|
memcpy(u->uuid, invalid_uuid, 16);
|
|
memcpy(u->uuid, invalid_uuid, 16);
|
|
- u->invalidated = cpu_to_le32(get_seconds());
|
|
|
|
|
|
+ u->invalidated = cpu_to_le32((u32)ktime_get_real_seconds());
|
|
u = NULL;
|
|
u = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1398,7 +1398,7 @@ int bch_flash_dev_create(struct cache_set *c, uint64_t size)
|
|
|
|
|
|
get_random_bytes(u->uuid, 16);
|
|
get_random_bytes(u->uuid, 16);
|
|
memset(u->label, 0, 32);
|
|
memset(u->label, 0, 32);
|
|
- u->first_reg = u->last_reg = cpu_to_le32(get_seconds());
|
|
|
|
|
|
+ u->first_reg = u->last_reg = cpu_to_le32((u32)ktime_get_real_seconds());
|
|
|
|
|
|
SET_UUID_FLASH_ONLY(u, 1);
|
|
SET_UUID_FLASH_ONLY(u, 1);
|
|
u->sectors = size >> 9;
|
|
u->sectors = size >> 9;
|
|
@@ -1902,7 +1902,7 @@ static void run_cache_set(struct cache_set *c)
|
|
goto err;
|
|
goto err;
|
|
|
|
|
|
closure_sync(&cl);
|
|
closure_sync(&cl);
|
|
- c->sb.last_mount = get_seconds();
|
|
|
|
|
|
+ c->sb.last_mount = (u32)ktime_get_real_seconds();
|
|
bcache_write_super(c);
|
|
bcache_write_super(c);
|
|
|
|
|
|
list_for_each_entry_safe(dc, t, &uncached_devices, list)
|
|
list_for_each_entry_safe(dc, t, &uncached_devices, list)
|