* FIXME: With nfs exporting we can get a disconnected dentry here.
* This can happen if the dcache is dropped on the server while the
* client is working, and export ops decodefh returns ESTALE to the
- * user. It would best to catch this by implementing decodefh
- * or maybe we could connect the dentry ourselves using getparent?
+ * user. It would best to catch this by implementing decodefh or
+ * maybe we could connect the dentry ourselves using getparent?
*/
if (dentry->d_flags & DCACHE_DISCONNECTED) {
err = -ESTALE;
#define THRESH_BH_MAX 99
#define THRESH_BH_DEF 80
#define THRESH_BH_INFO "defaults to %d%%. The threshold of consumed disk " \
- "blocks in\n/odf, above which we begin cleaning. Must be higher " \
+ "blocks in\n/odf, above which we begin cleaning. Must be higher " \
"than the value of\n" THRESH_BL
#define THRESH_BL "block_low_thresh"
#define THRESH_BL_MIN 1
#define THRESH_IH_MAX 99
#define THRESH_IH_DEF 80
#define THRESH_IH_INFO "defaults to %d%%. The threshold of consumed inodes" \
- " in /odf,\nabove which we begin cleaning. Must be higher than the " \
+ " in /odf,\nabove which we begin cleaning. Must be higher than the " \
"value of " THRESH_IL
#define THRESH_IL "inode_low_thresh"
#define THRESH_IL_MIN 1
struct nameidata lowernd; /* TODO: be gentler to the stack */
/*
- * FIXME: with nfs exporting, if export ops fails to connect a dentry
- * and returns ESTALE to the client, we can end up with an inode that
- * has ibstart -1. This fix only stops the oopsing but the dentry will
- * become unusable on the client, it will keep getting ESTALE on any
- * attempt to fix it. The best way to fix this is by implementing
- * decode_fh and making sure no inode gets left with -1 ibstart
+ * FIXME: with nfs exporting, if export ops fails to connect a
+ * dentry and returns ESTALE to the client, we can end up with an
+ * inode that has ibstart -1. This fix only stops the oopsing but
+ * the dentry will become unusable on the client, it will keep
+ * getting ESTALE on any attempt to fix it. The best way to fix
+ * this is by implementing decode_fh and making sure no inode gets
+ * left with -1 ibstart
*/
if (dentry->d_inode && ibstart(dentry->d_inode) < 0) {
valid = 0;
goto out;
/*
- * Ideally we would want all entries we find here to be in the
- * odf and have a persistent inode. However it is possible for the
+ * Ideally we would want all entries we find here to be in the odf
+ * and have a persistent inode. However it is possible for the
* entries not to be in the odf yet, and thus not have a valid odf
- * inode number. We could have created an entry in the odf at this
+ * inode number. We could have created an entry in the odf at this
* point, but since we do not have a unionfs dentry here we wouldn't
- * be able to check for hardlinks
+ * be able to check for hardlinks.
*/
if (odf_dentry)
ino = odf_dentry->d_inode->i_ino;
/*
* Cleanup function for the odf cleanup thread.
* First cleans up the dir caches in odf/ic and then everything
- * in odf/reclaim. It stops once the requested blocks/inodes
+ * in odf/reclaim. It stops once the requested blocks/inodes
* were freed.
*
* b_to_free and i_to_free contains the requested amount of blocks
/*
* If this dentry is disconnected, then it is
* anonymous, so we have to get its name using
- * get_name. However since it is disconnected it
- * doesn't know its parent. Thankfully since we
+ * get_name. However since it is disconnected it
+ * doesn't know its parent. Thankfully since we
* already looked up its parent in this loop we have
* its parent in the union dentry's parent odf_info
* struct
return i;
}
/*
- * Opaqueness is stored in the odf using branch ids. The odf
+ * Opaqueness is stored in the odf using branch ids. The odf
* uses this function to translate the branch id to branch index.
* Since branch management causes some branch ids to change or be
* removed, this function can legally fail to find the branch id
* (2) if you set the mount option `mode=nfsro', we assume that -EACCES
* means that the export is read-only and we should check standard Unix
* permissions. This means that NFS ACL checks (or other advanced
- * permission features) are bypassed. Note however, that we do call
+ * permission features) are bypassed. Note, however, that we do call
* security_inode_permission, and therefore security inside SELinux, etc.
* are performed.
*/
/*
* We should already have a lock on this dentry in the case of a
- * partial lookup, or a revalidation. Otherwise it is returned from
+ * partial lookup, or a revalidation. Otherwise it is returned from
* new_dentry_private_data already locked.
*/
if (lookupmode == INTERPOSE_PARTIAL || lookupmode == INTERPOSE_REVAL ||
err = PTR_ERR(spliced);
/*
- * d_splice can return a dentry if it was disconnected
- * and had to be moved. We must make sure that the pd
- * of the new dentry is correct and that the inode info
- * was filled properly. Finally we must return this new
- * dentry
+ * d_splice can return a dentry if it was disconnected and
+ * had to be moved. We must make sure that the private data
+ * of the new dentry is correct and that the inode info was
+ * filled properly. Finally we must return this new dentry.
*/
else if (spliced && spliced != dentry) {
spliced->d_op = &unionfs_dops;
continue;
/*
- * All of our options take an argument now. Insert ones that
- * don't, above this check.
+ * All of our options take an argument now. Insert ones
+ * that don't, above this check.
*/
if (!optarg) {
printk("unionfs: %s requires an argument.\n", optname);
/*
* ODF lookup - There are two wrapper functions for looking up entries
- * in the ODF: odf_lookup and and odf_lookup_name. Apart from looking up
+ * in the ODF: odf_lookup and and odf_lookup_name. Apart from looking up
* entries they both can create dirs, files or whiteouts if the requested
* file does not yet exist in the odf.
*
/*
* odf_lookup: This function should be used whenever we have a unionfs
- * dentry and want to find its entry in the ODF. Before doing the lookup
+ * dentry and want to find its entry in the ODF. Before doing the lookup
* it checks for hardlinks and tries to lazily build up the links in the
* odf.
*
/*
* odf_lookup_name: This function should be used whenever we don't have a
- * unionfs dentry, but want to lookup a name in the odf. It should never
+ * unionfs dentry, but want to lookup a name in the odf. It should never
* be used to create entries in the odf, apart from whiteouts, since it
* does not handle hardlinks.
*
* required and handles hardlinks
*
* @parent: unionfs dir dentry
- * @target: unionfs target dentry. If not NULL, lookup will update its
+ * @target: unionfs target dentry. If not NULL, lookup will update its
* odf_dentry_info if an entry is found, or else NULLify it.
* Its name is not used for the lookup, as it can be NULL
* @name: the name to look for
* @len: name length
* @flags: ODF_LOOKUP_ flags (see above)
* @link: an odf dentry that's the odf entry of one the target dentry's
- * links. If this is not NULL, lookup will make sure the looked
+ * links. If this is not NULL, lookup will make sure the looked
* up dentry is linked to the given link in the odf
*
* XXX: whether link should be an odf or unionfs dentry should
* ODF_RMV_ANY - remove entry regardless of state
*
* If the item to be removed has i_count > 1 it is silly renamed (moved
- * to (/odf/sr). XXX: If there's any place where we don't want this
+ * to (/odf/sr). XXX: If there's any place where we don't want this
* behavior we can use an additional flag to this function.
*/
int odf_remove(struct dentry *dentry, int flags)
}
/*
- * Sets a dentry as opaque. The branch must be the branch_id
+ * Sets a dentry as opaque. The branch must be the branch_id
* as stored in unionfs sb.
*/
int odf_set_opaque(struct dentry *odf_dentry, int branch)
}
/*
- * Worker function for the cleanup thread. It recursively removes all entries
- * in the reclaim directory
+ * Worker function for the cleanup thread. It recursively removes all
+ * entries in the reclaim directory.
*/
void __odf_cleanup(void *args)
{
}
/*
- * Creates an asynchronous thread. Calling process is responsible
- * for calling wait_for_completion. The thread executes the work function,
- * then sleeps for timeout time. When it wakes up it runs the done function
- * and terminates if done, otherwise repeats the loop.
- * The done function should return 0 if not done.
+ * Creates an asynchronous thread. Calling process is responsible for
+ * calling wait_for_completion. The thread executes the work function, then
+ * sleeps for timeout time. When it wakes up it runs the done function and
+ * terminates if done, otherwise repeats the loop. The done function should
+ * return 0 if not done.
*/
void run_sioa(struct sioa_args *args, void (*work) (void*),
signed long timeout)
/*
- * Update the odf. rewrite the superblock data file with all
- * the new branch information
+ * Update the odf. Rewrite the superblock data file with all the
+ * new branch information.
*/
/* first we need to update the uuids */
/* call d_drop so the system "forgets" about us */
if (!err) {
/*
- * If there was a whiteout created then the original
- * ODF entry was removed and replaced by a previous call
- * to create_whiteout. If not, the original entry is still
+ * If there was a whiteout created then the original ODF
+ * entry was removed and replaced by a previous call to
+ * create_whiteout. If not, the original entry is still
* here, so we just remove it only if its not a whiteout
*/
/* FIXME: what if this fails? */