Commit 56656e96 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Miklos Szeredi

ovl: rename is_merge to is_lowest

The 'is_merge' is an historical naming from when only a single lower layer
could exist.  With the introduction of multiple lower layers the meaning of
this flag was changed to mean only the "lowest layer" (while all lower
layers were being merged).

So now 'is_merge' is inaccurate and hence renaming to 'is_lowest'
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent f134f244
...@@ -36,7 +36,7 @@ struct ovl_dir_cache { ...@@ -36,7 +36,7 @@ struct ovl_dir_cache {
struct ovl_readdir_data { struct ovl_readdir_data {
struct dir_context ctx; struct dir_context ctx;
bool is_merge; bool is_lowest;
struct rb_root root; struct rb_root root;
struct list_head *list; struct list_head *list;
struct list_head middle; struct list_head middle;
...@@ -140,9 +140,9 @@ static int ovl_cache_entry_add_rb(struct ovl_readdir_data *rdd, ...@@ -140,9 +140,9 @@ static int ovl_cache_entry_add_rb(struct ovl_readdir_data *rdd,
return 0; return 0;
} }
static int ovl_fill_lower(struct ovl_readdir_data *rdd, static int ovl_fill_lowest(struct ovl_readdir_data *rdd,
const char *name, int namelen, const char *name, int namelen,
loff_t offset, u64 ino, unsigned int d_type) loff_t offset, u64 ino, unsigned int d_type)
{ {
struct ovl_cache_entry *p; struct ovl_cache_entry *p;
...@@ -194,10 +194,10 @@ static int ovl_fill_merge(struct dir_context *ctx, const char *name, ...@@ -194,10 +194,10 @@ static int ovl_fill_merge(struct dir_context *ctx, const char *name,
container_of(ctx, struct ovl_readdir_data, ctx); container_of(ctx, struct ovl_readdir_data, ctx);
rdd->count++; rdd->count++;
if (!rdd->is_merge) if (!rdd->is_lowest)
return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type); return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type);
else else
return ovl_fill_lower(rdd, name, namelen, offset, ino, d_type); return ovl_fill_lowest(rdd, name, namelen, offset, ino, d_type);
} }
static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd) static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd)
...@@ -290,7 +290,7 @@ static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list) ...@@ -290,7 +290,7 @@ static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list)
.ctx.actor = ovl_fill_merge, .ctx.actor = ovl_fill_merge,
.list = list, .list = list,
.root = RB_ROOT, .root = RB_ROOT,
.is_merge = false, .is_lowest = false,
}; };
int idx, next; int idx, next;
...@@ -307,7 +307,7 @@ static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list) ...@@ -307,7 +307,7 @@ static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list)
* allows offsets to be reasonably constant * allows offsets to be reasonably constant
*/ */
list_add(&rdd.middle, rdd.list); list_add(&rdd.middle, rdd.list);
rdd.is_merge = true; rdd.is_lowest = true;
err = ovl_dir_read(&realpath, &rdd); err = ovl_dir_read(&realpath, &rdd);
list_del(&rdd.middle); list_del(&rdd.middle);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment