Skip to content

Commit

Permalink
Add sfs_trace for lookup and compare inside it
Browse files Browse the repository at this point in the history
  • Loading branch information
azat committed Oct 1, 2014
1 parent 65ab062 commit bd11888
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,14 @@ struct dentry *simplefs_lookup(struct inode *parent_inode,

bh = sb_bread(sb, parent->data_block_number);
BUG_ON(!bh);
sfs_trace("Lookup in: ino=%llu, b=%llu\n",
parent->inode_no, parent->data_block_number);

record = (struct simplefs_dir_record *)bh->b_data;
for (i = 0; i < parent->dir_children_count; i++) {
sfs_trace("Have file: '%s' (ino=%llu)\n",
record->filename, record->inode_no);

if (!strcmp(record->filename, child_dentry->d_name.name)) {
/* FIXME: There is a corner case where if an allocated inode,
* is not written to the inode store, but the inodes_count is
Expand Down

0 comments on commit bd11888

Please sign in to comment.