tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: fcntl(F_GETPATH) support
In article <EBEA75F5-30E2-41CE-A2CC-494765452C72%me.com@localhost>,
Jason Thorpe <thorpej%me.com@localhost> wrote:
>
>
>> On Sep 17, 2019, at 1:39 PM, Christos Zoulas <christos%astron.com@localhost> wrote:
>>
>> I am not sure though if we should change the current behavior just to make
>> F_GETPATH better? Opinions?
>
>It seems completely logical that we SHOULD fix this.
I concur. Specially because some filesystems already do it. These
are the only ones that need to be changed:
christos
Index: fs/msdosfs/msdosfs_vnops.c
===================================================================
RCS file: /cvsroot/src/sys/fs/msdosfs/msdosfs_vnops.c,v
retrieving revision 1.98
diff -u -u -r1.98 msdosfs_vnops.c
--- fs/msdosfs/msdosfs_vnops.c 26 Apr 2017 03:02:48 -0000 1.98
+++ fs/msdosfs/msdosfs_vnops.c 17 Sep 2019 22:40:01 -0000
@@ -153,6 +153,8 @@
goto bad;
VN_KNOTE(ap->a_dvp, NOTE_WRITE);
*ap->a_vpp = DETOV(dep);
+ cache_enter(ap->a_dvp, *ap->a_vpp, cnp->cn_nameptr, cnp->cn_namelen,
+ cnp->cn_flags);
return (0);
bad:
Index: fs/tmpfs/tmpfs_subr.c
===================================================================
RCS file: /cvsroot/src/sys/fs/tmpfs/tmpfs_subr.c,v
retrieving revision 1.104
diff -u -u -r1.104 tmpfs_subr.c
--- fs/tmpfs/tmpfs_subr.c 1 Jan 2019 10:06:54 -0000 1.104
+++ fs/tmpfs/tmpfs_subr.c 17 Sep 2019 22:40:01 -0000
@@ -434,6 +434,7 @@
VOP_UNLOCK(*vpp);
+ cache_enter(dvp, *vpp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_flags);
return 0;
}
Index: fs/udf/udf_subr.c
===================================================================
RCS file: /cvsroot/src/sys/fs/udf/udf_subr.c,v
retrieving revision 1.146
diff -u -u -r1.146 udf_subr.c
--- fs/udf/udf_subr.c 3 Jun 2019 06:04:20 -0000 1.146
+++ fs/udf/udf_subr.c 17 Sep 2019 22:40:01 -0000
@@ -5963,6 +5963,7 @@
/* adjust file count */
udf_adjust_filecount(udf_node, 1);
+ cache_enter(dvp, *vpp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_flags);
return 0;
}
Index: ufs/chfs/chfs_vnode.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/chfs/chfs_vnode.c,v
retrieving revision 1.15
diff -u -u -r1.15 chfs_vnode.c
--- ufs/chfs/chfs_vnode.c 1 Apr 2017 19:35:57 -0000 1.15
+++ ufs/chfs/chfs_vnode.c 17 Sep 2019 22:40:01 -0000
@@ -310,6 +310,8 @@
VOP_UNLOCK(vp);
*vpp = vp;
+ cache_enter(pdir, *vpp, cnp->cn_nameptr, cnp->cn_namelen,
+ cnp->cn_flags);
return (0);
}
Index: ufs/ext2fs/ext2fs_vnops.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ext2fs/ext2fs_vnops.c,v
retrieving revision 1.129
diff -u -u -r1.129 ext2fs_vnops.c
--- ufs/ext2fs/ext2fs_vnops.c 1 Jan 2019 10:06:55 -0000 1.129
+++ ufs/ext2fs/ext2fs_vnops.c 17 Sep 2019 22:40:01 -0000
@@ -1045,6 +1045,7 @@
}
*vpp = tvp;
+ cache_enter(dvp, *vpp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_flags);
return 0;
bad:
Index: ufs/lfs/lfs_vnops.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/lfs/lfs_vnops.c,v
retrieving revision 1.324
diff -u -u -r1.324 lfs_vnops.c
--- ufs/lfs/lfs_vnops.c 20 Jun 2019 00:49:11 -0000 1.324
+++ ufs/lfs/lfs_vnops.c 17 Sep 2019 22:40:01 -0000
@@ -405,6 +405,7 @@
if (error)
goto bad;
*vpp = tvp;
+ cache_enter(dvp, *vpp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_flags);
KASSERT(VOP_ISLOCKED(*vpp) == LK_EXCLUSIVE);
return (0);
Index: ufs/ufs/ufs_vnops.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ufs/ufs_vnops.c,v
retrieving revision 1.247
diff -u -u -r1.247 ufs_vnops.c
--- ufs/ufs/ufs_vnops.c 1 Jul 2019 00:57:06 -0000 1.247
+++ ufs/ufs/ufs_vnops.c 17 Sep 2019 22:40:01 -0000
@@ -1909,6 +1909,7 @@
if (error)
goto bad;
*vpp = tvp;
+ cache_enter(dvp, *vpp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_flags);
return (0);
bad:
Home |
Main Index |
Thread Index |
Old Index