Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a935519 authored by Boaz Harrosh's avatar Boaz Harrosh
Browse files

exofs: Trivial: fix some indentation and debug prints



I stumbled on some of these prints in log files so, might
just submit the fixes.

* All i_ino prints in exofs should be hex
* All OSD_ERR prints should end with a "\n"

Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
parent 2c722c9a
Loading
Loading
Loading
Loading
+18 −15
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ static void exofs_check_page(struct page *page)

Ebadsize:
	EXOFS_ERR("ERROR [exofs_check_page]: "
		"size of directory #%lu is not a multiple of chunk size",
		"size of directory(0x%lx) is not a multiple of chunk size\n",
		dir->i_ino
	);
	goto fail;
@@ -142,8 +142,8 @@ static void exofs_check_page(struct page *page)
	goto bad_entry;
bad_entry:
	EXOFS_ERR(
		"ERROR [exofs_check_page]: bad entry in directory #%lu: %s - "
		"offset=%lu, inode=%llu, rec_len=%d, name_len=%d",
		"ERROR [exofs_check_page]: bad entry in directory(0x%lx): %s - "
		"offset=%lu, inode=0x%llu, rec_len=%d, name_len=%d\n",
		dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs,
		_LLU(le64_to_cpu(p->inode_no)),
		rec_len, p->name_len);
@@ -151,8 +151,8 @@ static void exofs_check_page(struct page *page)
Eend:
	p = (struct exofs_dir_entry *)(kaddr + offs);
	EXOFS_ERR("ERROR [exofs_check_page]: "
		"entry in directory #%lu spans the page boundary"
		"offset=%lu, inode=%llu",
		"entry in directory(0x%lx) spans the page boundary"
		"offset=%lu, inode=0x%llx\n",
		dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs,
		_LLU(le64_to_cpu(p->inode_no)));
fail:
@@ -261,8 +261,7 @@ exofs_readdir(struct file *filp, void *dirent, filldir_t filldir)
		struct page *page = exofs_get_page(inode, n);

		if (IS_ERR(page)) {
			EXOFS_ERR("ERROR: "
				   "bad page in #%lu",
			EXOFS_ERR("ERROR: bad page in directory(0x%lx)\n",
				  inode->i_ino);
			filp->f_pos += PAGE_CACHE_SIZE - offset;
			return PTR_ERR(page);
@@ -283,7 +282,8 @@ exofs_readdir(struct file *filp, void *dirent, filldir_t filldir)
		for (; (char *)de <= limit; de = exofs_next_entry(de)) {
			if (de->rec_len == 0) {
				EXOFS_ERR("ERROR: "
					"zero-length directory entry");
				     "zero-length entry in directory(0x%lx)\n",
				     inode->i_ino);
				exofs_put_page(page);
				return -EIO;
			}
@@ -342,9 +342,9 @@ struct exofs_dir_entry *exofs_find_entry(struct inode *dir,
			kaddr += exofs_last_byte(dir, n) - reclen;
			while ((char *) de <= kaddr) {
				if (de->rec_len == 0) {
					EXOFS_ERR(
						"ERROR: exofs_find_entry: "
						"zero-length directory entry");
					EXOFS_ERR("ERROR: zero-length entry in "
						  "directory(0x%lx)\n",
						  dir->i_ino);
					exofs_put_page(page);
					goto out;
				}
@@ -472,7 +472,8 @@ int exofs_add_link(struct dentry *dentry, struct inode *inode)
			}
			if (de->rec_len == 0) {
				EXOFS_ERR("ERROR: exofs_add_link: "
					"zero-length directory entry");
				      "zero-length entry in directory(0x%lx)\n",
				      inode->i_ino);
				err = -EIO;
				goto out_unlock;
			}
@@ -491,7 +492,8 @@ int exofs_add_link(struct dentry *dentry, struct inode *inode)
		exofs_put_page(page);
	}

	EXOFS_ERR("exofs_add_link: BAD dentry=%p or inode=%p", dentry, inode);
	EXOFS_ERR("exofs_add_link: BAD dentry=%p or inode=0x%lx\n",
		  dentry, inode->i_ino);
	return -EINVAL;

got_it:
@@ -542,7 +544,8 @@ int exofs_delete_entry(struct exofs_dir_entry *dir, struct page *page)
	while (de < dir) {
		if (de->rec_len == 0) {
			EXOFS_ERR("ERROR: exofs_delete_entry:"
				"zero-length directory entry");
				  "zero-length entry in directory(0x%lx)\n",
				  inode->i_ino);
			err = -EIO;
			goto out;
		}