/* SPDX-License-Identifier: GPL-2.0-only */ /* * V9FS VFS extensions. * * Copyright (C) 2004 by Eric Van Hensbergen <ericvh@gmail.com> * Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov>
*/ #ifndef FS_9P_V9FS_VFS_H #define FS_9P_V9FS_VFS_H
/* plan9 semantics are that created files are implicitly opened. * But linux semantics are that you call create, then open. * the plan9 approach is superior as it provides an atomic * open. * we track the create fid here. When the file is opened, if fidopen is * non-zero, we use the fid and can skip some steps. * there may be a better way to do this, but I don't know it. * one BAD way is to clunk the fid on create, then open it again: * you lose the atomicity of file open
*/
/* special case: * unlink calls remove, which is an implicit clunk. So we have to track * that kind of thing so that we don't try to clunk a dead fid.
*/ #define P9_LOCK_TIMEOUT (30*HZ)
/* flags for v9fs_stat2inode() & v9fs_stat2inode_dotl() */ #define V9FS_STAT2INODE_KEEP_ISIZE 1
staticinlinevoid v9fs_i_size_write(struct inode *inode, loff_t i_size)
{ /* * 32-bit need the lock, concurrent updates could break the * sequences and make i_size_read() loop forever. * 64-bit updates are atomic and can skip the locking.
*/ if (sizeof(i_size) > sizeof(long))
spin_lock(&inode->i_lock);
i_size_write(inode, i_size); if (sizeof(i_size) > sizeof(long))
spin_unlock(&inode->i_lock);
} #endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.