Lines 273-281
Link Here
|
273 |
* Funcation is called for every vnode open. |
273 |
* Funcation is called for every vnode open. |
274 |
* Merge fuse_open_flags it may be 0 |
274 |
* Merge fuse_open_flags it may be 0 |
275 |
* |
275 |
* |
276 |
* XXXIP: Handle FOPEN_DIRECT_IO and FOPEN_KEEP_CACHE |
276 |
* XXXIP: Handle FOPEN_KEEP_CACHE |
277 |
*/ |
277 |
*/ |
|
|
278 |
/* |
279 |
* Ideally speaking, direct io should be enabled on |
280 |
* fd's but do not see of any way of providing that |
281 |
* this implementation. |
278 |
|
282 |
|
|
|
283 |
* Also cannot think of a reason why would two |
284 |
* different fd's on same vnode would like |
285 |
* have DIRECT_IO turned on and off. But linux |
286 |
* based implementation works on an fd not an |
287 |
* inode and provides such a feature. |
288 |
* |
289 |
* XXXIP: Handle fd based DIRECT_IO |
290 |
*/ |
291 |
if (fuse_open_flags & FOPEN_DIRECT_IO) { |
292 |
VTOFUD(vp)->flag |= FN_DIRECTIO; |
293 |
} else { |
294 |
VTOFUD(vp)->flag &= ~FN_DIRECTIO; |
295 |
} |
296 |
|
279 |
if (vnode_vtype(vp) == VREG) { |
297 |
if (vnode_vtype(vp) == VREG) { |
280 |
/* XXXIP prevent getattr, by using cached node size */ |
298 |
/* XXXIP prevent getattr, by using cached node size */ |
281 |
vnode_create_vobject(vp, 0, td); |
299 |
vnode_create_vobject(vp, 0, td); |