Christoph,
> We will only have sense data if the command exectured and got a SCSI
> result, so this is pointless.
"executed"
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the bo
On Fri, May 26, 2017 at 08:33:16PM +0200, David Sterba wrote:
> On Thu, May 25, 2017 at 06:26:31PM -0600, Liu Bo wrote:
> > Currently scrub only verify checksum of both metadata and data and
> > couldn't detect an invalid extent_item.
>
> This is a different kind of check that scrub was never desi
Signed-off-by: Anand Jain
---
Hi David,
I note the original patch [1] is already queued so here I am sending
a fix-up patch can you pls squash this to [1]
[1]
[PATCH 2/3 v2] btrfs: reduce arguments for decompress_bio ops
This fixup patch, fixes issues reported by kbuild test robot which
Before this, we use 'filled' mode here, ie. if all range has been
filled with EXTENT_DEFRAG bits, get to clear it, but if the defrag
range joins the adjacent delalloc range, then we'll have EXTENT_DEFRAG
bits in extent_state until releasing this inode's pages, and that
prevents extent_date from bei
This patchset has several improvements around the qgroups user-facing
API. It introduces two new ioctls for creating, and removing qgroups.
These ioctls have a new args structure that allows passing flags, and
some reserved fields for future expansion. The ioctls prevent some
operations around leve
This patch introduces two new ioctls to create, and remove qgroups. These
offer a somewhat more intuitive set of operations with the opportunity
to add flags that gate to unintentional manipulation of qgroups.
The create qgroup ioctl has a a new semantic which level-0 qgroups cannot
be created unl
This patch adds a warning to let the user know when the legacy
qgroup creation / removal API is in use. Eventually, we can
deprecate this API.
Signed-off-by: Sargun Dhillon
---
fs/btrfs/ioctl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 78c832
This patch introduces a new mount option - qgroup_auto_cleanup.
The purpose of this mount option is to cause btrfs to automatically
delete qgroups on subvolume deletion. This only cleans up the
associated level-0 qgroup, and not qgroups that are above it.
Since this behaviour is API-breaking, as p
Previously, we were calling del_qgroup_item, and ignoring the return code
resulting in a potential to have divergent in-memory state without an
error. Perhaps, it makes sense to handle this error code, and put the
filesystem into a read only, or similar state.
This patch only adds reporting of the
On 05/27/2017 02:08 AM, David Sterba wrote:
On Fri, May 26, 2017 at 03:45:00PM +0800, Anand Jain wrote:
This patch adds compression and decompression trace points for the
purpose of debugging.
Signed-off-by: Anand Jain
---
v2: no change
fs/btrfs/compression.c | 10 ++
include/
On 05/26/2017 10:07 PM, kbuild test robot wrote:
Hi Anand,
[auto build test ERROR on tip/perf/core]
[also build test ERROR on v4.12-rc2 next-20170526]
[cannot apply to btrfs/next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url
On Fri, May 26, 2017 at 08:20:11PM +0200, David Sterba wrote:
> On Thu, May 25, 2017 at 06:26:30PM -0600, Liu Bo wrote:
> > Now that we have a helper to report invalid value of extent inline ref
> > type, we need to quit gracefully instead of throwing out a kernel panic.
> >
> > Signed-off-by: Liu
On Fri, May 26, 2017 at 08:18:22PM +0200, David Sterba wrote:
> On Thu, May 25, 2017 at 06:26:29PM -0600, Liu Bo wrote:
> > btrfs_print_leaf() is used in btrfs_get_extent_inline_ref_type, so
> > here we really want to print the invalid value of ref type instead of
> > causing a kernel panic.
> >
>
On Fri, May 26, 2017 at 07:08:31PM +0200, David Sterba wrote:
> On Thu, May 25, 2017 at 06:39:52AM -0400, Jeff Layton wrote:
> > Nothing checks its return value.
>
> I think we don't need to check the return value of
> filemap_fdatawait_range, because the errors are tracked by other means
> (attac
On Sat, May 20, 2017 at 08:39:37AM +, Sargun Dhillon wrote:
> This patch is just changing whitespace alignment in qgroup.h
> int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
> - struct btrfs_fs_info *fs_info, u64 qgroupid);
> + struct btr
On Wed, May 24, 2017 at 09:31:32AM +0800, Su Yue wrote:
> In verify_dir_item, it wants to printk name_len of dir_item but
> printk data_len acutally.
Good catch, thanks.
Reviewed-by: David Sterba
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message t
Hi Qu,
On 2017-05-25 08:21, Qu Wenruo wrote:
> And since kernel scrub won't account P/Q corruption, it makes us quite
> hard to detect error like kernel screwing up P/Q when scrubbing.
could you elaborate the above sentence: in my test the kernel-scrub
(4.12.0-rc2) is able to correct a wrong 'P
On Thu, May 25, 2017 at 06:26:31PM -0600, Liu Bo wrote:
> Currently scrub only verify checksum of both metadata and data and
> couldn't detect an invalid extent_item.
This is a different kind of check that scrub was never designed to do.
Scrub just verifies the checksums, not the sructural integri
On Thu, May 25, 2017 at 06:26:30PM -0600, Liu Bo wrote:
> Now that we have a helper to report invalid value of extent inline ref
> type, we need to quit gracefully instead of throwing out a kernel panic.
>
> Signed-off-by: Liu Bo
> ---
> fs/btrfs/relocation.c | 5 -
> 1 file changed, 4 inser
On Thu, May 25, 2017 at 06:26:29PM -0600, Liu Bo wrote:
> btrfs_print_leaf() is used in btrfs_get_extent_inline_ref_type, so
> here we really want to print the invalid value of ref type instead of
> causing a kernel panic.
>
> Signed-off-by: Liu Bo
> ---
> fs/btrfs/print-tree.c | 8 +++-
> 1
On Fri, May 26, 2017 at 08:13:05PM +0200, David Sterba wrote:
> On Fri, May 26, 2017 at 10:09:54AM +0300, Nikolay Borisov wrote:
> >
> >
> > On 26.05.2017 03:26, Liu Bo wrote:
> > > An invalid value of extent inline ref type may be read from a
> > > malicious image which may force btrfs to crash.
On Fri, May 26, 2017 at 10:09:54AM +0300, Nikolay Borisov wrote:
>
>
> On 26.05.2017 03:26, Liu Bo wrote:
> > An invalid value of extent inline ref type may be read from a
> > malicious image which may force btrfs to crash.
> >
> > This adds a helper which does sanity check for the ref type, so
On Fri, May 26, 2017 at 03:44:57PM +0800, Anand Jain wrote:
> Patch 1 and 2 are preparatory and clean up patches, and patch 3 adds
> the trace point for the compression.
1 and 2 added to queue, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a messa
On Fri, May 26, 2017 at 03:45:00PM +0800, Anand Jain wrote:
> This patch adds compression and decompression trace points for the
> purpose of debugging.
>
> Signed-off-by: Anand Jain
> ---
> v2: no change
> fs/btrfs/compression.c | 10 ++
> include/trace/events/btrfs.h | 36 +++
On Fri, May 26, 2017 at 03:44:58PM +0800, Anand Jain wrote:
> Instead of sending each argument of struct compressed_bio, send
> the compressed_bio itself.
>
> Also by having struct compressed_bio in btrfs_decompress_bio()
> it would help tracing.
>
> Signed-off-by: Anand Jain
> ---
> v2: no chan
On 5/26/17 3:09 AM, Nikolay Borisov wrote:
>
>
> On 26.05.2017 03:26, Liu Bo wrote:
>> An invalid value of extent inline ref type may be read from a
>> malicious image which may force btrfs to crash.
>>
>> This adds a helper which does sanity check for the ref type, so we can
>> know if it's sane
On Thu, May 25, 2017 at 06:39:52AM -0400, Jeff Layton wrote:
> Nothing checks its return value.
I think we don't need to check the return value of
filemap_fdatawait_range, because the errors are tracked by other means
(attached to the btree_inode mapping that represents the metadata), in
set_btree
On Mon, May 22, 2017 at 09:35:49AM +0300, Nikolay Borisov wrote:
> +static int create_space_info(struct btrfs_fs_info *info, u64 flags,
> + struct btrfs_space_info **new)
> +{
> +
> + struct btrfs_space_info *space_info;
> + int i;
> + int ret;
> +
> + space
On Mon, May 22, 2017 at 01:16:10PM +0300, Nikolay Borisov wrote:
> +static inline unsigned long BTRFS_LEAF_DATA_OFFSET(void)
> +{
> + return offsetof(struct btrfs_leaf, items);
> +}
Can we make it a simple macro? Functions in place of macros are useful
for type checking, but the parameter is g
On Thu, May 25, 2017 at 02:27:21PM -0700, Omar Sandoval wrote:
> On Thu, May 25, 2017 at 12:18:02PM -0700, Vinnie Magro wrote:
> > Replace alloc_bitmap with call to kvzalloc. kvzalloc preserves the
> > same fallback heuristic.
>
> Looks good, thanks.
>
> Reviewed-by: Omar Sandoval
Added to queu
On Thu, May 25, 2017 at 06:08:12PM -0600, Liu Bo wrote:
> This adds chunk_objectid and flags, with flags we can recognize whether
> the block group is about data or metadata.
>
> Signed-off-by: Liu Bo
Reviewed-by: David Sterba
--
To unsubscribe from this list: send the line "unsubscribe linux-b
Hi Anand,
[auto build test ERROR on tip/perf/core]
[also build test ERROR on v4.12-rc2 next-20170526]
[cannot apply to btrfs/next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
https://github.com/0day-ci/linux/commits/Anand-Jain
On 05/26/2017 10:56 AM, Christoph Hellwig wrote:
> Once we move the block layer to its own status code we'll still want to
> propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO
> to take ret into account when returning the errno.
> ---
-ENOSIGNOFF?
--
Johannes Thumshirn
Once we move the block layer to its own status code we'll still want to
propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO
to take ret into account when returning the errno.
---
fs/block_dev.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/block_
Instead use the special DM_MAPIO_KILL return value to return -EIO just
like we do for the request based path. Note that dm-log-writes returned
-ENOMEM in a few places, which now becomes -EIO instead. No consumer
treats -ENOMEM special so this shouldn't be an issue (and it should
use a mempool to
Turn the error paramter into a pointer so that target drivers can change
the value, and make sure only DM_ENDIO_* values are returned from the
methods.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-cache-target.c | 4 ++--
drivers/md/dm-flakey.c| 8
drivers/md/dm-log-wri
This simplifies the code and especially the error passing a bit and
will help with the next patch.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-mpath.c | 42 +++---
1 file changed, 15 insertions(+), 27 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/d
Only read bio->bi_error once in the common path.
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
---
fs/direct-io.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 04247a6c3f73..bb711e4b86c2 100644
--- a/fs/direct-io.
Use the same values for use for request completion errors as the return
value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause
a requeue, and all the others are completed as-is.
Signed-off-by: Christoph Hellwig
---
block/blk-mq.c| 37 --
A few (but not all) dm targets use a special EWOULDBLOCK error code for
failing REQ_RAHEAD requests that fail due to a lack of available resources.
But no one else knows about this magic code, and lower level drivers also
don't generate it when failing read-ahead requests for similar reasons.
So r
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
---
fs/btrfs/inode.c | 6 +++---
fs/direct-io.c | 3 +--
include/linux/fs.h | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 17cbe9306faf..758b2666885e 100644
--- a
This series introduces a new blk_status_t error code type for the block
layer so that we can have tigher control and explicit semantics for
block layer errors.
All but the last three patches are cleanups that lead to the new type.
The series it mostly limited to the block layer and drivers, and t
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
---
fs/gfs2/incore.h | 1 -
fs/gfs2/lops.c | 4 +---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index b7cf65d13561..aa3d44527fa2 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/inco
Instead of reinventing it poorly.
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
Reviewed-by: Javier González
---
drivers/nvme/host/lightnvm.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightn
We will only have sense data if the command exectured and got a SCSI
result, so this is pointless.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/osd/osd_initiator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_ini
Reviewed-by: Nikolay Borisov
Thanks.
Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 26.05.2017 10:44, Anand Jain wrote:
> struct compressed_bio pointer can be used instead.
>
> Signed-off-by: Anand Jain
> ---
> v2: added this patch
> fs/btrfs/compression.c | 43 +--
> fs/btrfs/compression.h | 44 ++
On 26.05.2017 10:44, Anand Jain wrote:
> Instead of sending each argument of struct compressed_bio, send
> the compressed_bio itself.
>
> Also by having struct compressed_bio in btrfs_decompress_bio()
> it would help tracing.
>
> Signed-off-by: Anand Jain
> ---
> v2: no changes
> fs/btrfs/com
Can you take this idea one notch further and refactor also
zlib_decompress_bio and lzo_decompress_bio functions as well?
Done. Added in v2.
Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majo
This patch adds compression and decompression trace points for the
purpose of debugging.
Signed-off-by: Anand Jain
---
v2: no change
fs/btrfs/compression.c | 10 ++
include/trace/events/btrfs.h | 36
2 files changed, 46 insertions(+)
diff --git
struct compressed_bio pointer can be used instead.
Signed-off-by: Anand Jain
---
v2: added this patch
fs/btrfs/compression.c | 43 +--
fs/btrfs/compression.h | 44
fs/btrfs/lzo.c | 10 +-
fs/btrf
Instead of sending each argument of struct compressed_bio, send
the compressed_bio itself.
Also by having struct compressed_bio in btrfs_decompress_bio()
it would help tracing.
Signed-off-by: Anand Jain
---
v2: no changes
fs/btrfs/compression.c | 23 +--
1 file changed, 9 in
Patch 1 and 2 are preparatory and clean up patches, and patch 3 adds
the trace point for the compression.
I have used same trace function for both compress and decompress
as I wanted to maintain compress and decompress debug data aligned
v2: added patch #2
Anand Jain (3):
btrfs: btrfs_decompres
On 26.05.2017 03:26, Liu Bo wrote:
> An invalid value of extent inline ref type may be read from a
> malicious image which may force btrfs to crash.
>
> This adds a helper which does sanity check for the ref type, so we can
> know if it's sane, return type if so, otherwise return an error.
>
>
54 matches
Mail list logo