On Thu, Nov 12, 2020 at 6:48 PM Luis Henriques wrote:
>
> A NULL pointer dereference may occur in __ceph_remove_cap with some of the
> callbacks used in ceph_iterate_session_caps, namely trim_caps_cb and
> remove_session_caps_cb. These aren't protected against the concurrent
> execution of __ceph
truct inode *inode,
> struct ceph_mds_caps *ex,
> WARN_ON(1);
> tsession = NULL;
> target = -1;
> + mutex_lock(&session->s_mutex);
> }
> goto retry;
>
> --
> 1.8.3.1
>
Reviewed-by: "Yan, Zheng"
On Wed, Apr 29, 2020 at 8:49 AM Wu Bo wrote:
>
> On 2020/4/28 22:48, Jeff Layton wrote:
> > On Tue, 2020-04-28 at 21:13 +0800, Wu Bo wrote:
> >> if the ceph_mdsc_open_export_target_session() return fails,
> >> should add a lock to avoid twice unlocking.
> >> Because the lock will be released at th
On Tue, Apr 28, 2020 at 8:50 PM Wu Bo wrote:
>
> If the ceph_mdsc_open_export_target_session() return fails,
> should add a lock to avoid twice unlocking.
> Because the lock will be released at the retry or out_unlock tag.
>
at retry label, i_ceph_lock get locked. I don't see how i_ceph_lock
can
On 6/26/19 7:26 PM, Jeff Layton wrote:
Zheng wants to be able to spend more time working on the MDS, so I've
volunteered to take over for him as the CephFS kernel client maintainer.
ACK
Thanks
Yan, Zheng
Signed-off-by: Jeff Layton
---
MAINTAINERS | 4 ++--
1 file changed, 2 inser
On Tue, Jun 25, 2019 at 4:18 AM Jeff Layton wrote:
>
> The convention with xattrs is to not store the termination with string
> data, given that it returns the length. This is how setfattr/getfattr
> operate.
>
> Most of ceph's virtual xattr routines use snprintf to plop the string
> directly into
On Fri, Jun 21, 2019 at 10:21 PM Jeff Layton wrote:
>
> v3: switch to using an intermediate buffer for snprintf destination
> add patch to fix ceph_vxattrcb_layout return value
> v2: drop bogus EXPORT_SYMBOL of static function
>
> This is the 3rd posting of this patchset. Instead of adding a n
On Fri, Jun 14, 2019 at 9:48 PM Jeff Layton wrote:
>
> The getxattr interface returns a length after filling out the value
> buffer, and the convention with xattrs is to not NULL terminate string
> data.
>
> CephFS implements some virtual xattrs by using snprintf to fill the
> buffer, but that alw
remove_session_caps() relies on __wait_on_freeing_inode(), to wait for
freezing inode to remove its caps. But VFS wakes freeing inode waiters
before calling destroy_inode().
Signed-off-by: "Yan, Zheng"
---
fs/ceph/inode.c | 25 ++---
fs/ceph/super.c | 1 +
fs/ce
and server, the CIFS client and the kernel's VFS layer.
I will continue to work on CephFS, but spend more time on improving
CephFS metadata server.
Regards
Yan, Zheng
d30291b985d18 ("libceph: variable-sized ceph_object_id")
d3383a8e37f80 ("ceph: avoid block operation when !TASK_RUNNING
(ceph_mdsc_sync)")
e3ec8d6898f71 ("ceph: send cap releases more aggressively")
e96a650a8174e ("ceph, rbd: delete unnecessa
nt %p ino %llx.%llx err=%ld\n",
-child, ceph_vinop(inode), (IS_ERR(dn) ? PTR_ERR(dn) : 0));
+child, ceph_vinop(inode), (long)PTR_ERR_OR_ZERO(dn));
return dn;
}
Applied.
Thanks
Yan, Zheng
We have three workqueue for inode works. Later patch will introduce
one more work for inode. It's not good to introcuce more workqueue
and add more 'struct work_struct' to 'struct ceph_inode_info'.
Signed-off-by: "Yan, Zheng"
---
fs/ceph/file
.
In general, it's not good to call iput_final() inside MDS/OSD threads or
while holding any mutex.
The fix is introducing ceph_async_iput(), which calls iput_final() in
workqueue.
Signed-off-by: "Yan, Zheng"
---
fs/ceph/caps.c | 12
fs/ce
Signed-off-by: "Yan, Zheng"
---
fs/ceph/mds_client.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 60e8ddbdfdc5..870754e9d572 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -913,7 +913,7
ceph_d_revalidate(, LOOKUP_RCU) may call __ceph_caps_issued_mask()
on a freeing inode.
Cc: sta...@vger.kernel.org
Signed-off-by: "Yan, Zheng"
---
fs/ceph/caps.c | 10 ++
fs/ceph/inode.c | 2 +-
fs/ceph/super.h | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff
ode is locked. It does not need to check
parent/target inode and dentry name. Another version is for the case
that parent inode is not locked. It checks arent/target inode and dentry
name after locking dentry->d_lock.
Signed-off-by: "Yan, Zheng"
---
fs/ce
It should call __ceph_dentry_dir_lease_touch() under dentry->d_lock.
Besides, ceph_dentry(dentry) can be NULL when called by LOOKUP_RCU
d_revalidate()
Cc: sta...@vger.kernel.org # v5.1+
Signed-off-by: "Yan, Zheng"
---
fs/ceph/dir.c | 26 +-
1 file changed,
Signed-off-by: "Yan, Zheng"
---
fs/ceph/dir.c| 7 +++
fs/ceph/mds_client.c | 24 +---
fs/ceph/mds_client.h | 1 -
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 1271024a3797..72efad28857c 100644
---
The function return 0 even when interrupted or try_get_cap_refs()
return error.
Introduce by commit 1199d7da2d "ceph: simplify arguments and return
semantics of try_get_cap_refs"
Signed-off-by: "Yan, Zheng"
---
fs/ceph/caps.c | 22 +++---
1 file changed,
kernel.org
Reported-by: "Paul E. McKenney"
Reported-by: Peter Zijlstra
Signed-off-by: Andrea Parri
Cc: "Yan, Zheng"
Cc: Sage Weil
Cc: Ilya Dryomov
Cc: ceph-de...@vger.kernel.org
Cc: "Paul E. McKenney"
Cc: Peter Zijlstra
---
fs/ceph/super.h | 7 ++-
1 file chang
On 5/10/19 4:55 AM, Andrea Parri wrote:
On Tue, Apr 30, 2019 at 05:08:43PM +0800, Yan, Zheng wrote:
On Tue, Apr 30, 2019 at 4:26 PM Peter Zijlstra wrote:
On Mon, Apr 29, 2019 at 10:15:00PM +0200, Andrea Parri wrote:
This barrier only applies to the read-modify-write operations; in
On Tue, Apr 30, 2019 at 4:26 PM Peter Zijlstra wrote:
>
> On Mon, Apr 29, 2019 at 10:15:00PM +0200, Andrea Parri wrote:
> > This barrier only applies to the read-modify-write operations; in
> > particular, it does not apply to the atomic64_set() primitive.
> >
> > Replace the barrier with an smp_m
On Tue, Apr 16, 2019 at 9:30 PM Luis Henriques wrote:
>
> Luis Henriques writes:
>
> > "Yan, Zheng" writes:
> >
> >> On Fri, Mar 22, 2019 at 6:04 PM Luis Henriques wrote:
> >>>
> >>> Luis Henriques writes:
> >>>
>
On Fri, Mar 22, 2019 at 6:04 PM Luis Henriques wrote:
>
> Luis Henriques writes:
>
> > "Yan, Zheng" writes:
> >
> >> On Tue, Mar 19, 2019 at 12:22 AM Luis Henriques
> >> wrote:
> >>>
> >>> "Yan, Zheng" w
On Wed, Mar 20, 2019 at 10:53 PM David Howells wrote:
>
> Signed-off-by: David Howells
> cc: Ilya Dryomov
> cc: "Yan, Zheng"
> cc: Sage Weil
> cc: ceph-de...@vger.kernel.org
> ---
>
> drivers/block/rbd.c | 362 +++-
>
On Wed, Mar 20, 2019 at 10:53 PM David Howells wrote:
>
> Signed-off-by: David Howells
> cc: Ilya Dryomov
> cc: "Yan, Zheng"
> cc: Sage Weil
> cc: ceph-de...@vger.kernel.org
> ---
>
> drivers/block/rbd.c | 362 +++-
>
On Tue, Mar 19, 2019 at 12:22 AM Luis Henriques wrote:
>
> "Yan, Zheng" writes:
>
> > On Mon, Mar 18, 2019 at 6:33 PM Luis Henriques wrote:
> >>
> >> "Yan, Zheng" writes:
> >>
> >> > On Fri, Mar 15, 2019 at 7:13 P
On Tue, Mar 12, 2019 at 10:22 PM Luis Henriques wrote:
>
> The CephFS kernel client does not enforce quotas set in a directory that
> isn't visible from the mount point. For example, given the path
> '/dir1/dir2', if quotas are set in 'dir1' and the filesystem is mounted with
>
> mount -t ceph
On Mon, Mar 18, 2019 at 6:55 PM Luis Henriques wrote:
>
> "Yan, Zheng" writes:
>
> > On Mon, Mar 18, 2019 at 5:06 PM Gregory Farnum wrote:
> >>
> >> On Mon, Mar 18, 2019 at 2:32 PM Yan, Zheng wrote:
> >> > After reading the code c
On Mon, Mar 18, 2019 at 6:33 PM Luis Henriques wrote:
>
> "Yan, Zheng" writes:
>
> > On Fri, Mar 15, 2019 at 7:13 PM Luis Henriques wrote:
> >>
> >> I'm occasionally seeing a kmemleak warning in xfstest generic/013:
> >>
> >
On Mon, Mar 18, 2019 at 5:06 PM Gregory Farnum wrote:
>
> On Mon, Mar 18, 2019 at 2:32 PM Yan, Zheng wrote:
> > After reading the code carefully. I feel a little uncomfortable with
> > the "lookup_ino" in get_quota_realm. how about populating directories
> &g
if (IS_ERR(in))
> + break;
> + ceph_put_snap_realm(mdsc, realm);
> + goto restart;
> + }
> ci = ceph_inode(in);
> spin_lock(&ci->i_ceph_lock);
> if (op == QUOTA_CHECK_MAX_FILES_OP) {
> @@ -314,7 +400,7 @@ bool ceph_quota_update_statfs(struct ceph_fs_client *fsc,
> struct kstatfs *buf)
> bool is_updated = false;
>
> down_read(&mdsc->snap_rwsem);
> - realm = get_quota_realm(mdsc, d_inode(fsc->sb->s_root));
> + realm = get_quota_realm(mdsc, d_inode(fsc->sb->s_root), true);
> up_read(&mdsc->snap_rwsem);
> if (!realm)
> return false;
> diff --git a/fs/ceph/super.h b/fs/ceph/super.h
> index ce51e98b08ec..cc7766aeb73b 100644
> --- a/fs/ceph/super.h
> +++ b/fs/ceph/super.h
> @@ -375,6 +375,8 @@ struct ceph_inode_info {
> struct list_head i_snap_realm_item;
> struct list_head i_snap_flush_item;
>
> + struct list_head i_quotarealms_inode_item;
> +
> struct work_struct i_wb_work; /* writeback work */
> struct work_struct i_pg_inv_work; /* page invalidation work */
>
After reading the code carefully. I feel a little uncomfortable with
the "lookup_ino" in get_quota_realm. how about populating directories
above the 'mount subdir' during mounting (similar to cifs_get_root ).
Regards
Yan, Zheng
On Fri, Mar 15, 2019 at 7:13 PM Luis Henriques wrote:
>
> I'm occasionally seeing a kmemleak warning in xfstest generic/013:
>
> unreferenced object 0x8881fccca940 (size 32):
> comm "kworker/0:1", pid 12, jiffies 4295005883 (age 130.648s)
> hex dump (first 32 bytes):
> 01 00 00 00 00 0
On Sat, Mar 9, 2019 at 12:30 AM Luis Henriques wrote:
>
> The CephFS kernel client does not enforce quotas set in a directory that isn't
> visible from the mount point. For example, given the path '/dir1/dir2', if
> quotas
> are set in 'dir1' and the filesystem is mounted with
>
> mount -t cep
On Thu, Mar 7, 2019 at 7:02 PM Luis Henriques wrote:
>
> "Yan, Zheng" writes:
>
> > On Thu, Mar 7, 2019 at 2:21 AM Luis Henriques wrote:
> >>
> >> "Yan, Zheng" writes:
> >>
> >> > On Sat, Mar 2, 2019 at 3:13 AM Luis
On Thu, Mar 7, 2019 at 2:21 AM Luis Henriques wrote:
>
> "Yan, Zheng" writes:
>
> > On Sat, Mar 2, 2019 at 3:13 AM Luis Henriques wrote:
> >>
> >> The CephFS kernel client doesn't enforce quotas that are set in a
> >> directory that
On Sat, Mar 2, 2019 at 3:13 AM Luis Henriques wrote:
>
> The CephFS kernel client doesn't enforce quotas that are set in a
> directory that isn't visible in the mount point. For example, given the
> path '/dir1/dir2', if quotas are set in 'dir1' and the mount is done in with
>
> mount -t ceph :
7,8 @@ static bool check_quota_exceeded(struct inode *inode,
> enum quota_check_op op,
> ceph_put_snap_realm(mdsc, realm);
> realm = next;
> }
> - ceph_put_snap_realm(mdsc, realm);
> + if (realm)
> + ceph_put_snap_realm(mdsc, realm);
> up_read(&mdsc->snap_rwsem);
>
> return exceeded;
Applied, thanks.
Yan, Zheng
;, ret);
> goto out;
> + }
>
> /*
> * We need FILE_WR caps for dst_ci and FILE_RD for src_ci as other
Applied, thanks
Yan, Zheng
>i_ceph_lock);
> @@ -1817,9 +1793,6 @@ static long ceph_fallocate(struct file *file, int mode,
> spin_unlock(&ci->i_ceph_lock);
> if (dirty)
> __mark_inode_dirty(inode, dirty);
> - if ((endoff > size) &&
> - ceph_quota_is_max_bytes_approaching(inode, endoff))
> - ceph_check_caps(ci, CHECK_CAPS_NODELAY, NULL);
> }
>
> ceph_put_cap_refs(ci, got);
Applied, thanks
Yan, Zheng
+1489,7 @@ const struct file_operations ceph_dir_fops = {
> .open = ceph_open,
> .release = ceph_release,
> .unlocked_ioctl = ceph_ioctl,
> + .compat_ioctl = ceph_ioctl,
> .fsync = ceph_fsync,
> .lock = ceph_lock,
> .flock = ceph_flock,
> --
> 2.18.0
>
Reviewed-by: "Yan, Zheng"
success. we'll keep the page locked. */
> set_page_dirty(page);
> ret = VM_FAULT_LOCKED;
> }
> - } while (ret == -EAGAIN);
> + } while (err == -EAGAIN);
>
> if (ret == VM_FAULT_LOCKED ||
&
/* success. we'll keep the page locked. */
> set_page_dirty(page);
> ret = VM_FAULT_LOCKED;
> }
> - } while (ret == -EAGAIN);
> + } while (err == -EAGAIN);
>
> if (ret == VM_FAULT_LOCKED |
The cephfs part (patch 2~5) looks good for me.
Regards
Yan, Zheng
On Sat, Jul 14, 2018 at 4:21 AM Arnd Bergmann wrote:
>
> ceph_mdsc_create_request() is one of the last callers of the
> deprecated current_kernel_time() as well as timespec_trunc().
>
> This changes it to use
X;
>
> /* Must convert the fsid, for consistent values across arches */
> - fsid = le64_to_cpu(*(__le64 *)(&monmap->fsid)) ^
> - le64_to_cpu(*((__le64 *)&monmap->fsid + 1));
> + mutex_lock(&monc->mutex);
> + fsid = le64_to_cpu(*(__le64 *)(&monc->monmap->fsid)) ^
> + le64_to_cpu(*((__le64 *)&monc->monmap->fsid + 1));
> + mutex_unlock(&monc->mutex);
> +
> buf->f_fsid.val[0] = fsid & 0x;
> buf->f_fsid.val[1] = fsid >> 32;
>
Applied, thanks
Yan, Zheng
> --
> 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
1)
> + /* '.' + '..' + subdirs */
> + stat->nlink = 1 + 1 + ci->i_subdirs;
> }
> }
> return err;
Applied, thanks.
Yan, Zheng
On Fri, Dec 15, 2017 at 12:53 AM, Jan Kara wrote:
> On Thu 14-12-17 22:30:26, Yan, Zheng wrote:
>> On Thu, Dec 14, 2017 at 9:43 PM, Jan Kara wrote:
>> > On Thu 14-12-17 18:55:27, Yan, Zheng wrote:
>> >> We recently got an Oops report:
>> >>
>&
On Thu, Dec 14, 2017 at 9:43 PM, Jan Kara wrote:
> On Thu 14-12-17 18:55:27, Yan, Zheng wrote:
>> We recently got an Oops report:
>>
>> BUG: unable to handle kernel NULL pointer dereference at (null)
>> IP: jbd2__journal_start+0x38/0x1a2
>> [...]
>> Call Tr
page)
Cc: sta...@vger.kernel.org
Signed-off-by: "Yan, Zheng"
---
mm/memory.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/mm/memory.c b/mm/memory.c
index a728bed16c20..db2a50233c49 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4044,6 +4044,7 @@ int han
> On 14 Dec 2017, at 08:59, Andrew Morton wrote:
>
> On Wed, 13 Dec 2017 11:58:36 +0800 "Yan, Zheng" wrote:
>
>> We recently got an Oops report:
>>
>> BUG: unable to handle kernel NULL pointer dereference at (null)
>> IP: jbd2__j
> On 14 Dec 2017, at 08:59, Andrew Morton wrote:
>
> On Wed, 13 Dec 2017 11:58:36 +0800 "Yan, Zheng" wrote:
>
>> We recently got an Oops report:
>>
>> BUG: unable to handle kernel NULL pointer dereference at (null)
>> IP: jbd2__j
ace memory is mapped to a file on another filesystem,
the later filesystem may also want to use current->journal_info.
Signed-off-by: "Yan, Zheng"
---
mm/memory.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/mm/memory.c b/mm/memory.c
in
t; + bool wake_mdsc = false;
>
> list_for_each_entry_safe(cf, tmp_cf, &ci->i_cap_flush_list, i_list) {
> if (cf->tid == flush_tid)
Applied, thanks
Yan, Zheng
anged, 38 insertions(+), 42 deletions(-)
>
> —
Whole series applied, thanks
Yan, Zheng
> 2.14.0
>
nd, int datasync)
>
> dout("fsync %p%s\n", inode, datasync ? " datasync" : "");
>
> - ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
> + ret = file_write_and_wait_range(file, start, end);
> if (ret < 0)
> goto out;
>
> --
> 2.13.3
>
Reviewed-by: "Yan, Zheng"
mount_state;
> int min_caps; /* min caps i added */
> + bool wb_fault;
>
> struct ceph_mds_client *mdsc;
>
> @@ -100,6 +101,7 @@ struct ceph_fs_client {
> struct dentry *debugfs_bdi;
> struct dentry *debugfs_mdsc, *debugfs_mdsmap;
> struct dentry *debugfs_mds_sessions;
> + struct dentry *debugfs_wb_fault;
> #endif
>
I think it's better not to enable this feature by default. Enabling it
by compilation option or mount option?
Regards
Yan, Zheng
> #ifdef CONFIG_CEPH_FSCACHE
> --
> 2.13.3
>
(0);
> @@ -916,9 +914,6 @@ static u32 osd_req_encode_op(struct ceph_osd_op *dst,
> * if the file was recently truncated, we include information about its
> * old and new size so that the object can be updated appropriately. (we
> * avoid synchronously deleting truncated objects because it's slow.)
> - *
> - * if @do_sync, include a 'startsync' command so that the osd will flush
> - * data quickly.
> */
> struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
> struct ceph_file_layout *layout,
> --
> 1.8.3.1
>
Applied, thanks.
Yan, Zheng
On Fri, Jun 2, 2017 at 10:18 PM, Arnd Bergmann wrote:
> On Fri, Jun 2, 2017 at 2:18 PM, Yan, Zheng wrote:
>> On Fri, Jun 2, 2017 at 7:33 PM, Arnd Bergmann wrote:
>>> On Fri, Jun 2, 2017 at 1:18 PM, Yan, Zheng wrote:
>>> What I meant is another related proble
On Fri, Jun 2, 2017 at 7:33 PM, Arnd Bergmann wrote:
> On Fri, Jun 2, 2017 at 1:18 PM, Yan, Zheng wrote:
>> On Fri, Jun 2, 2017 at 6:51 PM, Arnd Bergmann wrote:
>>> On Fri, Jun 2, 2017 at 12:10 PM, Yan, Zheng wrote:
>>>> On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergma
On Fri, Jun 2, 2017 at 6:51 PM, Arnd Bergmann wrote:
> On Fri, Jun 2, 2017 at 12:10 PM, Yan, Zheng wrote:
>> On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergmann wrote:
>>> On Fri, Jun 2, 2017 at 4:09 AM, Yan, Zheng wrote:
>>>> On Fri, Jun 2, 2017 at 8:57 AM, Deepa Dinam
On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergmann wrote:
> On Fri, Jun 2, 2017 at 4:09 AM, Yan, Zheng wrote:
>> On Fri, Jun 2, 2017 at 8:57 AM, Deepa Dinamani
>> wrote:
>>> On Thu, Jun 1, 2017 at 5:36 PM, John Stultz wrote:
>>>> On Thu, Jun 1, 2017 at 5:26 PM,
On Fri, Jun 2, 2017 at 8:57 AM, Deepa Dinamani wrote:
> On Thu, Jun 1, 2017 at 5:36 PM, John Stultz wrote:
>> On Thu, Jun 1, 2017 at 5:26 PM, Yan, Zheng wrote:
>>> On Thu, Jun 1, 2017 at 6:22 PM, Arnd Bergmann wrote:
>>>> On Thu, Jun 1, 2017 at 11:56 AM, Yan, Zhe
On Thu, Jun 1, 2017 at 6:22 PM, Arnd Bergmann wrote:
> On Thu, Jun 1, 2017 at 11:56 AM, Yan, Zheng wrote:
>> On Sat, Apr 8, 2017 at 8:57 AM, Deepa Dinamani
>> wrote:
>
>>> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
>>> index 517838b..77204da
On Thu, Jun 1, 2017 at 6:22 PM, Arnd Bergmann wrote:
> On Thu, Jun 1, 2017 at 11:56 AM, Yan, Zheng wrote:
>> On Sat, Apr 8, 2017 at 8:57 AM, Deepa Dinamani
>> wrote:
>
>>> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
>>> index 517838b..77204da
auses our kernel_untar_tar test case to fail (inode's
ctime goes back). The reason is that there is time drift between the
time stamps got by ktime_get_real_ts() and current_time(). We need to
revert this change until current_time() uses ktime_get_real_ts()
internally.
Regards
Yan, Zheng
>
>
> On 19 May 2017, at 00:48, Luis Henriques wrote:
>
> On Thu, May 18, 2017 at 09:36:44PM +0800, Yan, Zheng wrote:
>>
>>> On 17 May 2017, at 19:21, Luis Henriques wrote:
>>>
>>> Converting a file handle to a dentry can be done call after the inode
&
if (inode->i_nlink == 0) {
> + iput(inode);
> + return ERR_PTR(-ESTALE);
> + }
> }
maybe we should do this check in MDS
Regards
Yan, Zheng
>
> return d_obtain_alias(inode);
P_SIZE)) {
> endoff = offset + length;
> + ret = inode_newsize_ok(inode, endoff);
> + if (ret)
> + goto unlock;
> + }
>
> if (fi->fmode & CEPH_FILE_MODE_LAZY)
> want = CEPH
}
> if (update_xattr < 0) {
> if (xattr)
> __remove_xattr(ci, xattr);
> kfree(name);
> + kfree(*newxattr);
> return 0;
> }
> }
Applied, thanks
Yan, Zheng
> On 28 Apr 2017, at 17:14, Alexander Graf wrote:
>
>
>
> On 28.04.17 09:57, Yan, Zheng wrote:
>>
>>> On 28 Apr 2017, at 00:34, Alexander Graf wrote:
>>>
>>> The file open flags (O_foo) are platform specific and should never go
>>
gs” dout and applied the patch. Thank you for
tracking down and fixing the bug.
Regards
Yan, Zheng
>
> v1 -> v2:
>
> - Only convert flags mds knows about
> - Fix le conversion
> ---
> fs/ceph/file.c | 35 ++-
> include
> On 21 Apr 2017, at 21:59, Alexander Graf wrote:
>
>
>
> On 21.04.17 04:22, Yan, Zheng wrote:
>>
>>> On 20 Apr 2017, at 20:40, Alexander Graf wrote:
>>>
>>> The file open flags (O_foo) are platform specific and should never go
>>
0020
> +#define CEPH_O_NOFOLLOW 0040
> +#define CEPH_O_NOATIME 0100
> +#define CEPH_O_CLOEXEC 0200
> +#define CEPH___O_SYNC04000000
> +#define CEPH_O_PATH 01000
> +#define CEPH___O_TMPFILE 02000
> +
RDONLY, WRONLY, RDWR, CREAT, EXCL, TRUNC, DIRECTORY, NOFOLLOW are used by mds,
no need to define the rest.
> union ceph_mds_request_args {
> struct {
> __le32 mask; /* CEPH_CAP_* */
Besides, the ceph mds server requires the fix too. Do you have patch for that?
Regards
Yan, Zheng
> --
> 1.8.5.6
>
/* max read size */
> -#define CEPH_RASIZE_DEFAULT(8192*1024) /* readahead */
> +#define CEPH_RSIZE_DEFAULT (64*1024*1024) /* max read size */
> +#define CEPH_RASIZE_DEFAULT (8192*1024)/* max readahead */
> #define CEPH_MAX_READDIR_DEFAULT1024
> #define CEPH_MAX_READDIR_BYTES_DEFAULT (512*1024)
> #define CEPH_SNAPDIRNAME_DEFAULT".snap”
Applied, Thanks
Yan, Zheng
> --
> 1.8.3.1
>
> + if (first || (contig && v.bv_offset == 0)) {
> + pv_size += v.bv_len;
> + first = false;
> + contig = PAGE_ALIGNED(v.bv_offset + v.bv_len);
> + }
> + }),
> + ({
> + if (first || (contig && PAGE_ALIGNED(v.iov_base))) {
> + pv_size += v.iov_len;
> + first = false;
> + contig = PAGE_ALIGNED(v.iov_base + v.iov_len);
> + }
> + }))
> + return pv_size;
> +}
> +EXPORT_SYMBOL(iov_iter_pvec_size);
> +
> static inline size_t __pipe_get_pages(struct iov_iter *i,
> size_t maxsize,
> struct page **pages,
Reviewed-by: Yan, Zheng
> --
> 2.7.4
>
le_set_cookie %p %p enabling cache\n",
> inode, filp);
> }
> }
> --
> 2.10.2
Applied, thanks
Yan, Zheng
>
> --
> 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
struct ceph_mds_client *mdsc)
> {
> u64 want_tid, want_flush;
>
> - if (ACCESS_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN)
> + if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN)
> return;
>
> dout("sync\n");
> @@ -3581,7 +3581,7 @@ void ceph_mdsc_sync(struct ceph_mds_client *mdsc)
> */
> static bool done_closing_sessions(struct ceph_mds_client *mdsc, int skipped)
> {
> - if (ACCESS_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN)
> + if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN)
> return true;
> return atomic_read(&mdsc->num_sessions) <= skipped;
> }
Applied, Thanks
Yan, Zheng
> --
> 2.10.2
>
t("dio_get_pagevlen len = %zu\n", size);
>return size;
> }
The read/write interface for ceph cluster accepts page vector. But we can only
specify offset for the first page. Except the first and last pages, all other
pages must be full size. This function finds size of pages
ent’s capabilities
dynamically.
We don’t want to splice read fail when client is disallowed to get page from
page cache.
Regards
Yan, Zheng
> Ilya? Can you double-check the current -git tree (well, what I *will*
> push out soon after it has passed my build tests)?
2);
>
> flags = CEPH_OSD_FLAG_ORDERSNAP |
> CEPH_OSD_FLAG_ONDISK |
>
>
Applied, Thanks
Yan, Zheng
> Regards,
> Zhi Zhang (David)
> Contact: zhang.david2...@gmail.com
> zhangz.da...@outlook.com
'root' may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
>
> It's not obvious to me what the correct fix is, so this just
> returns the saved root as we did before.
>
> Fixes: ce2728aaa82b ("ceph: avoid accessing / when mounting a subpat
root;
> + if (!root) {
> const char *path;
> err = __ceph_open_session(fsc->client, started);
> if (err < 0)
For sb->s_root is not NULL case, we also need to increase sb->s_root's
reference count. I applied this patch and fixed it.
Regards
Yan, Zheng
> --
> 1.9.1
>
while (!try_get_cap_refs(ci, need, want, endoff,
> + true, &_got, &err))
> + wait_woken(&wait, TASK_INTERRUPTIBLE,
> MAX_SCHEDULE_TIMEOUT);
> +
> + remove_wait_queue(&ci->i_cap_wq, &wait);
> +
> if (err == -EAGAIN)
> continue;
> if (err < 0)
> --
> 2.5.0
>
Applied, thanks
Yan, Zheng
> On 10 Oct 2016, at 21:50, Ilya Dryomov wrote:
>
> On Mon, Oct 10, 2016 at 3:13 PM, Nikolay Borisov wrote:
>>
>>
>> On 10/10/2016 04:11 PM, Yan, Zheng wrote:
>>>
>>>> On 10 Oct 2016, at 20:56, Nikolay Borisov wrote:
>>>>
>>
> On 10 Oct 2016, at 21:13, Nikolay Borisov wrote:
>
>
>
> On 10/10/2016 04:11 PM, Yan, Zheng wrote:
>>
>>> On 10 Oct 2016, at 20:56, Nikolay Borisov wrote:
>>>
>>> In case __ceph_do_getattr returns an error and the retry_op in
>>>
> + __free_page(page);
> if (statret == -ENODATA) {
> BUG_ON(retry_op != READ_INLINE);
> goto again;
> —
Reviewed-by: Yan, Zheng
> 2.5.0
>
if (is_hash_order(new_pos)) {
> /* no need to reset last_name for a forward seek when
>* dentries are sotred in hash order */
> - } else if (fi->frag |= fpos_frag(new_pos)) {
> + } else if (fi->frag != fpos_frag(new_pos)) {
> return true;
> }
> rinfo = fi->last_readdir ? &fi->last_readdir->r_reply_info : NULL;
Applied, thanks
Yan, Zheng
> --
> 2.9.3
>
loff_t
> offset, int whence)
> break;
> }
>
> - offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
> + ret = vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
>
> out:
> inode_unlock(inode);
> - return offset;
> + return ret;
> }
>
> static inline void ceph_zero_partial_page(
applied, thanks
Yan, Zheng
> --
> 2.9.0.rc2
>
t_caches(void)
> if (ceph_dentry_cachep == NULL)
> goto bad_dentry;
>
> - ceph_file_cachep = KMEM_CACHE(ceph_file_info,
> - SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD);
> + ceph_file_cachep = KMEM_CACHE(ceph_file_info, SLAB_MEM_SPREAD);
> On Jun 28, 2016, at 16:09, Miklos Szeredi wrote:
>
> On Thu, Jun 23, 2016 at 8:21 AM, Yan, Zheng wrote:
>>
>>> On Jun 22, 2016, at 22:35, Miklos Szeredi wrote:
>>>
>>> Pretty simple: just use ceph_dentry_info.time instead (which was already
e", fsc);
>> +pr_err("Unable to register fsid: %p fscache cookie", fsc);
>
> Could change to "cookie\n" to avoid possible interleaving
> from other messages too.
Applied , thanks
Yan, Zheng
> On Jun 22, 2016, at 22:35, Miklos Szeredi wrote:
>
> Pretty simple: just use ceph_dentry_info.time instead (which was already
> there, unused).
>
> Signed-off-by: Miklos Szeredi
> Cc: Yan, Zheng
> ---
> fs/ceph/dir.c| 6 +++---
> fs/ceph/inode.c |
__fscache_check_consistency() calls check_consistency() callback
and return the callback's return value. But the return type of
check_consistency() is bool. So __fscache_check_consistency()
return 1 if the cache is inconsistent. This is inconsistent with
the document.
Signed-off-by: "
Signed-off-by: "Yan, Zheng"
---
fs/fscache/page.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/fscache/page.c b/fs/fscache/page.c
index 3078b67..c8c4f79 100644
--- a/fs/fscache/page.c
+++ b/fs/fscache/page.c
@@ -887,6 +887,8 @@ void fscache_invalidate_writes(struct fsca
> On May 6, 2016, at 15:14, Zhang Zhuoyu
> wrote:
>
> Hi, Yan, Viro
>
> Any other comments on this updated version?
applied (after removing the rados.h hunk)
Thanks
Yan, Zheng
>
> Zhuoyu
>
>> -Original Message-
>> From: hellozzy1...@1
> On May 6, 2016, at 15:14, Zhang Zhuoyu
> wrote:
>
> Hi, Yan, Viro
>
> Any other comments on this updated version?
I have no comment for the cephfs part.
Ilya, do you like the libceph part?
Regards
Yan, Zheng
>
> Zhuoyu
>
>> -Original Message--
> the feature bits. It decodes a few extra fields in two different messages
>>>> and reports EIO when they are used (not yet supported).
>>>>
>>>> Thanks!
>>>> sage
>>>>
>>>>
>>>> -
>> This is a final commit we missed to align the protocol compatibility with
>> the feature bits. It decodes a few extra fields in two different messages
>> and reports EIO when they are used (not yet supported).
>>
>> Thanks!
>> sage
>>
>>
>>
,7 @@ static inline u64 ceph_snap(struct inode *inode)
> return ceph_inode(inode)->i_vino.snap;
> }
>
> -static inline int ceph_ino_compare(struct inode *inode, void *data)
> +static inline bool ceph_ino_compare(struct inode *inode, void *data)
This one is for ilookup5. ilookup5() wants
1 - 100 of 537 matches
Mail list logo