File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1916,6 +1916,8 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags)
1916
1916
1917
1917
spin_lock (& ci -> i_ceph_lock );
1918
1918
if (ci -> i_ceph_flags & CEPH_I_ASYNC_CREATE ) {
1919
+ ci -> i_ceph_flags |= CEPH_I_ASYNC_CHECK_CAPS ;
1920
+
1919
1921
/* Don't send messages until we get async create reply */
1920
1922
spin_unlock (& ci -> i_ceph_lock );
1921
1923
return ;
Original file line number Diff line number Diff line change @@ -534,14 +534,23 @@ static void wake_async_create_waiters(struct inode *inode,
534
534
struct ceph_mds_session * session )
535
535
{
536
536
struct ceph_inode_info * ci = ceph_inode (inode );
537
+ bool check_cap = false;
537
538
538
539
spin_lock (& ci -> i_ceph_lock );
539
540
if (ci -> i_ceph_flags & CEPH_I_ASYNC_CREATE ) {
540
541
ci -> i_ceph_flags &= ~CEPH_I_ASYNC_CREATE ;
541
542
wake_up_bit (& ci -> i_ceph_flags , CEPH_ASYNC_CREATE_BIT );
543
+
544
+ if (ci -> i_ceph_flags & CEPH_I_ASYNC_CHECK_CAPS ) {
545
+ ci -> i_ceph_flags &= ~CEPH_I_ASYNC_CHECK_CAPS ;
546
+ check_cap = true;
547
+ }
542
548
}
543
549
ceph_kick_flushing_inode_caps (session , ci );
544
550
spin_unlock (& ci -> i_ceph_lock );
551
+
552
+ if (check_cap )
553
+ ceph_check_caps (ci , CHECK_CAPS_FLUSH );
545
554
}
546
555
547
556
static void ceph_async_create_cb (struct ceph_mds_client * mdsc ,
Original file line number Diff line number Diff line change @@ -593,6 +593,8 @@ static inline struct inode *ceph_find_inode(struct super_block *sb,
593
593
#define CEPH_ASYNC_CREATE_BIT (12) /* async create in flight for this */
594
594
#define CEPH_I_ASYNC_CREATE (1 << CEPH_ASYNC_CREATE_BIT)
595
595
#define CEPH_I_SHUTDOWN (1 << 13) /* inode is no longer usable */
596
+ #define CEPH_I_ASYNC_CHECK_CAPS (1 << 14) /* check caps immediately after async
597
+ creating finishes */
596
598
597
599
/*
598
600
* Masks of ceph inode work.
You can’t perform that action at this time.
0 commit comments