Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from torvalds:master #51

Merged
merged 32 commits into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
91ff20f
ovl: fix missing override creds in link of a metacopy upper
amir73il Nov 14, 2018
155b8a0
ovl: fix decode of dir file handle with multi lower layers
amir73il Nov 5, 2018
4fc4bb7
fuse: Add bad inode check in fuse_destroy_inode()
myunghoj Nov 21, 2018
a9c2d1e
fuse: fix fsync on directory
Dec 3, 2018
d233c7d
fuse: fix revalidation of attributes for permission check
Dec 3, 2018
230bce5
media: vsp1: Fix LIF buffer thresholds
Nov 22, 2018
53e9d83
media: cedrus: Fix a NULL vs IS_ERR() check
Nov 26, 2018
0499021
media: vb2: don't call __vb2_queue_cancel if vb2_start_streaming failed
Nov 28, 2018
b7ff0b0
media: vb2: skip request checks for VIDIOC_PREPARE_BUF
Nov 28, 2018
6093d30
media: vb2: keep a reference to the request until dqbuf
Nov 28, 2018
dde6bdc
media: vb2: don't unbind/put the object when going to state QUEUED
Nov 28, 2018
e714c92
media: vivid: drop v4l2_ctrl_request_complete() from start_streaming
Nov 28, 2018
daa3fc4
media: vicodec: set state resolution from raw format
hverkuil Nov 28, 2018
ec7ba11
Revert "ovl: relax permission checking on underlying layers"
Dec 4, 2018
9514063
media: mpeg2-ctrls.h: move MPEG2 state controls to non-public header
Dec 5, 2018
cd9fd6f
media: extended-controls.rst: add note to the MPEG2 state controls
Dec 5, 2018
078ab3e
media: Add a Kconfig option for the Request API
Dec 5, 2018
687cf44
dm cache metadata: verify cache has blocks in blocks_are_clean_separa…
snitm Nov 9, 2018
89f5fa4
dm: call blk_queue_split() to impose device limits on bios
snitm Dec 3, 2018
d57f9da
dm zoned: Fix target BIO completion handling
damien-lemoal Nov 30, 2018
d72f70d
fuse: Fix memory leak in fuse_dev_free()
Dec 9, 2018
b61c192
tracing: Fix memory leak in create_filter()
rostedt Dec 9, 2018
3cec638
tracing: Fix memory leak in set_trigger_filter()
rostedt Dec 10, 2018
2840f84
tracing: Fix memory leak of instance function hash filters
rostedt Dec 11, 2018
f6c3675
dm thin: send event about thin-pool state change _after_ making it
snitm Dec 11, 2018
2e64ff1
fuse: continue to send FUSE_RELEASEDIR when FUSE_OPEN returns ENOSYS
chadaustin Dec 10, 2018
2af6c07
dm thin: bump target version
snitm Dec 12, 2018
b588400
Merge tag 'trace-v4.20-rc6' of git://git.kernel.org/pub/scm/linux/ker…
torvalds Dec 13, 2018
70f4828
Merge tag 'fuse-fixes-4.20-rc7' of git://git.kernel.org/pub/scm/linux…
torvalds Dec 13, 2018
e6333d7
Merge tag 'ovl-fixes-4.20-rc7' of git://git.kernel.org/pub/scm/linux/…
torvalds Dec 13, 2018
14a996c
Merge tag 'media/v4.20-5' of git://git.kernel.org/pub/scm/linux/kerne…
torvalds Dec 13, 2018
67f2a93
Merge tag 'for-4.20/dm-fixes' of git://git.kernel.org/pub/scm/linux/k…
torvalds Dec 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Documentation/media/uapi/v4l/extended-controls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,11 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
configuring a stateless hardware decoding pipeline for MPEG-2.
The bitstream parameters are defined according to :ref:`mpeg2part2`.

.. note::

This compound control is not yet part of the public kernel API and
it is expected to change.

.. c:type:: v4l2_ctrl_mpeg2_slice_params

.. cssclass:: longtable
Expand Down Expand Up @@ -1625,6 +1630,11 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
Specifies quantization matrices (as extracted from the bitstream) for the
associated MPEG-2 slice data.

.. note::

This compound control is not yet part of the public kernel API and
it is expected to change.

.. c:type:: v4l2_ctrl_mpeg2_quantization

.. cssclass:: longtable
Expand Down
4 changes: 4 additions & 0 deletions drivers/md/dm-cache-metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,10 @@ static int blocks_are_clean_separate_dirty(struct dm_cache_metadata *cmd,
bool dirty_flag;
*result = true;

if (from_cblock(cmd->cache_blocks) == 0)
/* Nothing to do */
return 0;

r = dm_bitset_cursor_begin(&cmd->dirty_info, cmd->dirty_root,
from_cblock(cmd->cache_blocks), &cmd->dirty_cursor);
if (r) {
Expand Down
72 changes: 37 additions & 35 deletions drivers/md/dm-thin.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static void throttle_unlock(struct throttle *t)
struct dm_thin_new_mapping;

/*
* The pool runs in 4 modes. Ordered in degraded order for comparisons.
* The pool runs in various modes. Ordered in degraded order for comparisons.
*/
enum pool_mode {
PM_WRITE, /* metadata may be changed */
Expand Down Expand Up @@ -282,9 +282,38 @@ struct pool {
mempool_t mapping_pool;
};

static enum pool_mode get_pool_mode(struct pool *pool);
static void metadata_operation_failed(struct pool *pool, const char *op, int r);

static enum pool_mode get_pool_mode(struct pool *pool)
{
return pool->pf.mode;
}

static void notify_of_pool_mode_change(struct pool *pool)
{
const char *descs[] = {
"write",
"out-of-data-space",
"read-only",
"read-only",
"fail"
};
const char *extra_desc = NULL;
enum pool_mode mode = get_pool_mode(pool);

if (mode == PM_OUT_OF_DATA_SPACE) {
if (!pool->pf.error_if_no_space)
extra_desc = " (queue IO)";
else
extra_desc = " (error IO)";
}

dm_table_event(pool->ti->table);
DMINFO("%s: switching pool to %s%s mode",
dm_device_name(pool->pool_md),
descs[(int)mode], extra_desc ? : "");
}

/*
* Target context for a pool.
*/
Expand Down Expand Up @@ -2351,8 +2380,6 @@ static void do_waker(struct work_struct *ws)
queue_delayed_work(pool->wq, &pool->waker, COMMIT_PERIOD);
}

static void notify_of_pool_mode_change_to_oods(struct pool *pool);

/*
* We're holding onto IO to allow userland time to react. After the
* timeout either the pool will have been resized (and thus back in
Expand All @@ -2365,7 +2392,7 @@ static void do_no_space_timeout(struct work_struct *ws)

if (get_pool_mode(pool) == PM_OUT_OF_DATA_SPACE && !pool->pf.error_if_no_space) {
pool->pf.error_if_no_space = true;
notify_of_pool_mode_change_to_oods(pool);
notify_of_pool_mode_change(pool);
error_retry_list_with_code(pool, BLK_STS_NOSPC);
}
}
Expand Down Expand Up @@ -2433,26 +2460,6 @@ static void noflush_work(struct thin_c *tc, void (*fn)(struct work_struct *))

/*----------------------------------------------------------------*/

static enum pool_mode get_pool_mode(struct pool *pool)
{
return pool->pf.mode;
}

static void notify_of_pool_mode_change(struct pool *pool, const char *new_mode)
{
dm_table_event(pool->ti->table);
DMINFO("%s: switching pool to %s mode",
dm_device_name(pool->pool_md), new_mode);
}

static void notify_of_pool_mode_change_to_oods(struct pool *pool)
{
if (!pool->pf.error_if_no_space)
notify_of_pool_mode_change(pool, "out-of-data-space (queue IO)");
else
notify_of_pool_mode_change(pool, "out-of-data-space (error IO)");
}

static bool passdown_enabled(struct pool_c *pt)
{
return pt->adjusted_pf.discard_passdown;
Expand Down Expand Up @@ -2501,8 +2508,6 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode)

switch (new_mode) {
case PM_FAIL:
if (old_mode != new_mode)
notify_of_pool_mode_change(pool, "failure");
dm_pool_metadata_read_only(pool->pmd);
pool->process_bio = process_bio_fail;
pool->process_discard = process_bio_fail;
Expand All @@ -2516,8 +2521,6 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode)

case PM_OUT_OF_METADATA_SPACE:
case PM_READ_ONLY:
if (!is_read_only_pool_mode(old_mode))
notify_of_pool_mode_change(pool, "read-only");
dm_pool_metadata_read_only(pool->pmd);
pool->process_bio = process_bio_read_only;
pool->process_discard = process_bio_success;
Expand All @@ -2538,8 +2541,6 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode)
* alarming rate. Adjust your low water mark if you're
* frequently seeing this mode.
*/
if (old_mode != new_mode)
notify_of_pool_mode_change_to_oods(pool);
pool->out_of_data_space = true;
pool->process_bio = process_bio_read_only;
pool->process_discard = process_discard_bio;
Expand All @@ -2552,8 +2553,6 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode)
break;

case PM_WRITE:
if (old_mode != new_mode)
notify_of_pool_mode_change(pool, "write");
if (old_mode == PM_OUT_OF_DATA_SPACE)
cancel_delayed_work_sync(&pool->no_space_timeout);
pool->out_of_data_space = false;
Expand All @@ -2573,6 +2572,9 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode)
* doesn't cause an unexpected mode transition on resume.
*/
pt->adjusted_pf.mode = new_mode;

if (old_mode != new_mode)
notify_of_pool_mode_change(pool);
}

static void abort_transaction(struct pool *pool)
Expand Down Expand Up @@ -4023,7 +4025,7 @@ static struct target_type pool_target = {
.name = "thin-pool",
.features = DM_TARGET_SINGLETON | DM_TARGET_ALWAYS_WRITEABLE |
DM_TARGET_IMMUTABLE,
.version = {1, 20, 0},
.version = {1, 21, 0},
.module = THIS_MODULE,
.ctr = pool_ctr,
.dtr = pool_dtr,
Expand Down Expand Up @@ -4397,7 +4399,7 @@ static void thin_io_hints(struct dm_target *ti, struct queue_limits *limits)

static struct target_type thin_target = {
.name = "thin",
.version = {1, 20, 0},
.version = {1, 21, 0},
.module = THIS_MODULE,
.ctr = thin_ctr,
.dtr = thin_dtr,
Expand Down
Loading