ret;
5190 }
I feel like we should be calling rbd_put_client() on this error path or
else the code is buggy or has layer violations. So I *think* it should
look like this:
dec_ref_counts:
rbd_spec_put(rbd_dev->parent_spec);
rbd_put_client(rbd_dev->rbd_client);
rbd_dev_destroy(pa
thing different is the error message.
2415 pr_warn(got unsafe after safe on %llu from mds%d\n,
2416 tid, mds);
2417 mutex_unlock(mdsc-mutex);
2418 goto out;
2419 }
regards,
dan carpenter
Probably this code was syncing a lot more often then intended because
the do_sync variable wasn't set to zero.
Fixes: c62988ec0910 ('ceph: avoid meaningless calling ceph_caps_revoking if
sync_mode == WB_SYNC_ALL.')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Static checker stuff
*/
1149 nearly = offset + object_set_size - 1;
1150 t = nearly;
1151 nearly -= do_div(t, object_set_size);
1152
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
On Thu, Feb 13, 2014 at 06:27:41AM -0600, Alex Elder wrote:
On 02/13/2014 06:04 AM, Ilya Dryomov wrote:
On Thu, Feb 13, 2014 at 11:50 AM, Dan Carpenter
dan.carpen...@oracle.com wrote:
Hello Yehuda Sadeh,
The patch 59c2be1e4d42: rbd: use watch/notify for changes in rbd
header from Mar
dn %p\n,
1311 rinfo-dir_nr, parent);
1312 if (rinfo-dir_dir)
^^
Old check.
1313 ceph_fill_dirfrag(parent-d_inode,
rinfo-dir_dir);
1314 }
regards,
dan carpenter
, frag-frag,
frag-split_by);
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
create_singlethread_workqueue() returns NULL on error, and it doesn't
return ERR_PTRs.
I tweaked the error handling a little to be consistent with earlier in
the function.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index
We've tried to fix the error paths in this function before, but there
is still a hidden goto in the ceph_decode_need() macro which goes to the
wrong place. We need to release the req and unlock a mutex before
returning.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/net/ceph
There are two places where we read nr_maps if both of them are set to
zero then we would hit a NULL dereference here.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
I think this is a real bug, but please review my fix for it because I'm
not very familiar with this code.
diff --git
We pass in a u64 value for len and then immediately truncate away the
upper 32 bits.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 2ddf061..93e53c8 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -313,9 +313,9 @@ static int
)
815 goto out_err;
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
I introduced a new temporary variable info instead of
m-m_info[mds]. Also I reversed the if condition and pulled
everything in one indent level.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
This goes on top of Emil Goode's patch.
diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c
On Wed, May 29, 2013 at 09:17:21AM +0200, walter harms wrote:
personally i would go for:
info-export_targets = NULL;
and remove the else below.
I don't have strong feelings one way or the other, but honestly, I
think the way I sent it is more clear.
regards,
dan carpenter
My static checker complains l-stripe_unit could still be zero after we
truncate it to 32 bits. I don't see a reason to do the truncation so
I have removed it. Both sides are u64 type.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c
index
On Tue, Apr 30, 2013 at 06:57:14AM -0500, Alex Elder wrote:
On 04/30/2013 02:24 AM, Dan Carpenter wrote:
Hello Alex Elder,
This is a semi-automatic email about new static checker warnings.
Cool, I've never used smatch before. Great to get these
automated warnings.
I looked
;
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
*pathlen = strlen(rpath);
^
Dereference.
1594 dout( path %.*s\n, *pathlen, rpath);
1595 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message
}
281
regards,
dan carpenter
See also:
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Oh crap. I didn't read this at all. Obviously a false positive.
Sorry about that.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
If l-stripe_unit is zero the the mod on the next line will cause a
divide by zero bug. This comes from the copy_from_user() in
ceph_ioctl_set_layout_policy()
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c
index 8e3fb69..81ec22b 100644
We dereference con-in_msg on the line after it was set to NULL.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 5e9f61d..6aa671c 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -437,10 +437,10 @@ static void
On Tue, Jun 19, 2012 at 08:27:19AM -0500, Alex Elder wrote:
On 06/19/2012 05:33 AM, Dan Carpenter wrote:
We dereference con-in_msg on the line after it was set to NULL.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
Yikes.
Actually I think I prefer a different fix, which
Sparse complains about this because:
drivers/block/rbd.c:996:20: warning: cast to restricted __le32
drivers/block/rbd.c:996:20: warning: cast from restricted __le16
These are set in osd_req_encode_op() and they are le16.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers
if it's a false positive
then I blame the script. Hope it's not too much spam.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
We should use the gfp_flags that the caller specified instead of
GFP_KERNEL here.
There is only one caller and it uses GFP_KERNEL, so this change is just
a cleanup and doesn't change how the code works.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/block/rbd.c b
The original code checked event_work for allocation failures, but only
after it had already use it.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 02212ed..b6776cb 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
...@newdream.net
Date: Tue Oct 6 11:31:08 2009 -0700
ceph: directory operations
regards,
dan carpenter
fs/ceph/dir.c +124 __dcache_readdir(28) error: we previously assumed 'last'
could be null.
116 /* start at beginning? */
117 if (filp-f_pos == 2
ceph_alloc_page_vector() returns ERR_PTR(-ENOMEM) on errors.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 1ac87f1..52f9420 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -826,8 +826,8 @@ static int rbd_req_sync_op
We should be passing buf here insead of bv. This is tricky because
it's not the same as kmap() and kunmap(). GCC does warn about it if you
compile on i386 with CONFIG_HIGHMEM.
Signed-off-by: Dan Carpenter erro...@gmail.com
---
If it's any consolation, out of three callers to bvec_kunmap_irq
ceph_mdsc_build_path() returns an ERR_PTR but this code is set up to
handle NULL returns.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index 360c4f2..6fd8b20 100644
--- a/fs/ceph/debugfs.c
+++ b/fs/ceph/debugfs.c
@@ -171,6 +171,8 @@ static int
31 matches
Mail list logo