Skip to contentSkip to conversation

Print when ENOSPC due to lack of inodes.

PATCH Superseded [email protected] 5 participants 19 messages Sep 26, 2012 – Apr 5, 2013 XFS filesystem

lore
Share & tools
lore
#0 lore raw

v3 cover Print when ENOSPC due to lack of inodes.

From: Raghavendra D Prabhu <[email protected]>

Currently, when there are no free inodes left / free space to allocate them (usually without inode64), there is no indication anywhere of this case, making it harder to diagnose this case.

Hence, this series prints the causes/reasons to kernel log in a ratelimited manner, when such a situation arises.

Regarding why it is printed at callee location instead at caller, it gives
greater granularity in expressing the precise reason and give more details, and
also some along the path are not ENOSPC (such in xfs_ialloc where ialloc_context is not NULL but ino is) along with the fact that it (xfs_ialloc) is called at multiple sites, so to avoid duplication.

Version 1: Initial series.
Version 2: Added ratelimited printing to xfs_message and used that. Version 3: Kept the logic intact in few places, fixed the column requirement.

Raghavendra D Prabhu (3):
xfs: Add ratelimited printk for different alert levels
xfs: Print error when xfs_ialloc_ag_select fails to find continuous
free space.
xfs: Print error when unable to allocate inodes or out of free
inodes.

 fs/xfs/xfs_ialloc.c  | 31 ++++++++++++++++++++++++++++---
 fs/xfs/xfs_linux.h   |  1 +
 fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 3 deletions(-)
Signature · 6 lines
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw

PATCH v3 1/3 xfs: Add ratelimited printk for different alert levels

From: Raghavendra D Prabhu <[email protected]>

Ratelimited printk will be useful in printing xfs messages which are otherwise not required to be printed always due to their high rate (to prevent kernel ring buffer from overflowing), while at the same time required to be printed.

---
 fs/xfs/xfs_linux.h   |  1 +
 fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
fs/xfs/xfs_linux.h +1 -0
index 828662f..49f8505 100644
@@ -71,6 +71,7 @@
 #include <linux/kthread.h>
 #include <linux/freezer.h>
 #include <linux/list_sort.h>
+#include <linux/ratelimit.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>
fs/xfs/xfs_message.h +26 -0
index 56dc0c1..76c8198 100644
@@ -30,6 +30,32 @@ void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
 }
 #endif
 
+#define xfs_printk_ratelimited(func, dev, fmt, ...)		\
+do {									\
+	static DEFINE_RATELIMIT_STATE(_rs,				\
+				      DEFAULT_RATELIMIT_INTERVAL,	\
+				      DEFAULT_RATELIMIT_BURST);		\
+	if (__ratelimit(&_rs))						\
+		func(dev, fmt, ##__VA_ARGS__);			\
+} while (0)
+
+#define xfs_emerg_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_emerg, dev, fmt, ##__VA_ARGS__)
+#define xfs_alert_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_alert, dev, fmt, ##__VA_ARGS__)
+#define xfs_crit_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_crit, dev, fmt, ##__VA_ARGS__)
+#define xfs_err_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_err, dev, fmt, ##__VA_ARGS__)
+#define xfs_warn_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_warn, dev, fmt, ##__VA_ARGS__)
+#define xfs_notice_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_notice, dev, fmt, ##__VA_ARGS__)
+#define xfs_info_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_info, dev, fmt, ##__VA_ARGS__)
+#define xfs_debug_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_debug, dev, fmt, ##__VA_ARGS__)
+
 extern void assfail(char *expr, char *f, int l);
 
 extern void xfs_hex_dump(void *p, int length);
Signature · 6 lines
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v3 1/3
#2 lore raw

Re: [v3,1/3] xfs: Add ratelimited printk for different alert levels

Quoted 8 lines · Raghavendra D Prabhu

From: Raghavendra D Prabhu <[email protected]>

Ratelimited printk will be useful in printing xfs messages which are otherwise not required to be printed always due to their high rate (to prevent kernel ring buffer from overflowing), while at the same time required to be printed.

Thanks Raghavendra,

Looks good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v3 1/3
#3 lore raw

Re: [PATCH v3 1/3] xfs: Add ratelimited printk for different alert levels

In reply to [email protected]
Quoted 7 lines · On Wed, Sep 26, 2012 at 12:26:47PM +0530, [email protected] wrote:

From: Raghavendra D Prabhu <[email protected]>

Ratelimited printk will be useful in printing xfs messages which are otherwise not required to be printed always due to their high rate (to prevent kernel ring buffer from overflowing), while at the same time required to be printed.

This is fine.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#4 lore raw

PATCH v3 1/1 xfs: Add ratelimited printk for different alert levels

In reply to [email protected]

From: Raghavendra D Prabhu <[email protected]>

Ratelimited printk will be useful in printing xfs messages which are otherwise not required to be printed always due to their high rate (to prevent kernel ring buffer from overflowing), while at the same time required to be printed.

---

Sorry this has not been committed and it's been a few months so I am reposting this patch. If I don't hear any objections by 10 am CST on 29 March 2013 I will commit this patch.

fs/xfs/xfs_linux.h | 1 +

 fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
fs/xfs/xfs_linux.h +1 -0
Index: linux/fs/xfs/xfs_linux.h
===================================================================
@@ -72,6 +72,7 @@
 #include <linux/kthread.h>
 #include <linux/freezer.h>
 #include <linux/list_sort.h>
+#include <linux/ratelimit.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>
fs/xfs/xfs_message.h +26 -0
Index: linux/fs/xfs/xfs_message.h
===================================================================
@@ -30,6 +30,32 @@
 }
 #endif
 
+#define xfs_printk_ratelimited(func, dev, fmt, ...)		\
+do {									\
+	static DEFINE_RATELIMIT_STATE(_rs,				\
+				      DEFAULT_RATELIMIT_INTERVAL,	\
+				      DEFAULT_RATELIMIT_BURST);		\
+	if (__ratelimit(&_rs))						\
+		func(dev, fmt, ##__VA_ARGS__);			\
+} while (0)
+
+#define xfs_emerg_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_emerg, dev, fmt, ##__VA_ARGS__)
+#define xfs_alert_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_alert, dev, fmt, ##__VA_ARGS__)
+#define xfs_crit_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_crit, dev, fmt, ##__VA_ARGS__)
+#define xfs_err_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_err, dev, fmt, ##__VA_ARGS__)
+#define xfs_warn_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_warn, dev, fmt, ##__VA_ARGS__)
+#define xfs_notice_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_notice, dev, fmt, ##__VA_ARGS__)
+#define xfs_info_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_info, dev, fmt, ##__VA_ARGS__)
+#define xfs_debug_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_debug, dev, fmt, ##__VA_ARGS__)
+
 extern void assfail(char *expr, char *f, int l);
 
 extern void xfs_hex_dump(void *p, int length);

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#5 lore raw

PATCH v3 1/1 xfs: Add ratelimited printk for different alert levels

In reply to [email protected]

Ratelimited printk will be useful in printing xfs messages which are otherwise not required to be printed always due to their high rate (to prevent kernel ring buffer from overflowing), while at the same time required to be printed.

---

Sorry this has not been committed and it's been a few months so I am reposting this patch. If I don't hear any objections by 10 am CST on 29 March 2013 I will commit this patch.

fs/xfs/xfs_linux.h | 1 +

 fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
fs/xfs/xfs_linux.h +1 -0
Index: linux/fs/xfs/xfs_linux.h
===================================================================
@@ -72,6 +72,7 @@
 #include <linux/kthread.h>
 #include <linux/freezer.h>
 #include <linux/list_sort.h>
+#include <linux/ratelimit.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>
fs/xfs/xfs_message.h +26 -0
Index: linux/fs/xfs/xfs_message.h
===================================================================
@@ -30,6 +30,32 @@
 }
 #endif
 
+#define xfs_printk_ratelimited(func, dev, fmt, ...)		\
+do {									\
+	static DEFINE_RATELIMIT_STATE(_rs,				\
+				      DEFAULT_RATELIMIT_INTERVAL,	\
+				      DEFAULT_RATELIMIT_BURST);		\
+	if (__ratelimit(&_rs))						\
+		func(dev, fmt, ##__VA_ARGS__);			\
+} while (0)
+
+#define xfs_emerg_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_emerg, dev, fmt, ##__VA_ARGS__)
+#define xfs_alert_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_alert, dev, fmt, ##__VA_ARGS__)
+#define xfs_crit_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_crit, dev, fmt, ##__VA_ARGS__)
+#define xfs_err_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_err, dev, fmt, ##__VA_ARGS__)
+#define xfs_warn_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_warn, dev, fmt, ##__VA_ARGS__)
+#define xfs_notice_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_notice, dev, fmt, ##__VA_ARGS__)
+#define xfs_info_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_info, dev, fmt, ##__VA_ARGS__)
+#define xfs_debug_ratelimited(dev, fmt, ...)				\
+	xfs_printk_ratelimited(xfs_debug, dev, fmt, ##__VA_ARGS__)
+
 extern void assfail(char *expr, char *f, int l);
 
 extern void xfs_hex_dump(void *p, int length);

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Applied
#6 lore raw

Re: [v3 Repost] xfs: Add ratelimited printk for different alert levels

Quoted 7 lines · Rich Johnston

Ratelimited printk will be useful in printing xfs messages which are otherwise not required to be printed always due to their high rate (to prevent kernel ring buffer from overflowing), while at the same time required to be printed.

Applied.

Thanks Raghavendra!

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#7 lore raw

PATCH v3 2/3 xfs: Print error when xfs_ialloc_ag_select fails to find continuous free space.

In reply to [email protected]

From: Raghavendra D Prabhu <[email protected]>

When xfs_ialloc_ag_select fails to find any AG with continuous free blocks required for inode allocation, printk the error in ratelimited manner.

---
 fs/xfs/xfs_ialloc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/xfs/xfs_ialloc.c +4 -1
index 5aceb3f..e75a39d 100644
@@ -539,8 +539,11 @@ nextag:
 		if (agno >= agcount)
 			agno = 0;
 		if (agno == pagno) {
-			if (flags == 0)
+			if (flags == 0) {
+				xfs_err_ratelimited(mp,
+					"Out of continuous free blocks for inode allocation");
 				return NULLAGNUMBER;
+			}
 			flags = 0;
 		}
 	}
Signature · 6 lines
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v3 2/3
#8 lore raw

Re: [v3, 2/3] xfs: Print error when xfs_ialloc_ag_select fails to find continuous free space.

Quoted 7 lines · Raghavendra D Prabhu

From: Raghavendra D Prabhu <[email protected]>

When xfs_ialloc_ag_select fails to find any AG with continuous free blocks required for inode allocation, printk the error in ratelimited manner.

Thanks Raghavendra,

Looks good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#9 lore raw

Re: [PATCH v3 2/3] xfs: Print error when xfs_ialloc_ag_select fails to find continuous free space.

In reply to [email protected]
Quoted 25 lines · On Wed, Sep 26, 2012 at 12:26:48PM +0530, [email protected] wrote:

From: Raghavendra D Prabhu <[email protected]>

When xfs_ialloc_ag_select fails to find any AG with continuous free blocks required for inode allocation, printk the error in ratelimited manner.

---
 fs/xfs/xfs_ialloc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/xfs/xfs_ialloc.c +4 -1
index 5aceb3f..e75a39d 100644
@@ -539,8 +539,11 @@ nextag:
 		if (agno >= agcount)
 			agno = 0;
 		if (agno == pagno) {
-			if (flags == 0)
+			if (flags == 0) {
+				xfs_err_ratelimited(mp,
+					"Out of continuous free blocks for inode allocation");
 				return NULLAGNUMBER;
+			}
 
Quoted 1 line

From here:

http://oss.sgi.com/archives/xfs/2012-09/msg00138.html

I quote:

| http://oss.sgi.com/archives/xfs/2012-06/msg00041.html
| 
| <quote>
| Couple of things for all 3 patches. Firstly - 80 columns. We tend
| to keep the pformat string on a single line so it is easy to grep
| for like so:
| 
|				pr_err_once(mp,
|                 "Insufficient contiguous free space for inode allocation");
| </quote>
| 
| So, you need to change the error message to the one suggested, and
| follow 80-character width limits like the rest of the code.
| 
| Also, I think the error message is better at the caller site, not in
| the function itself. i.e. if we get a NULLAGNUMBER returned, the
| caller decided whether to emit an error message or not."

So, the message here needs to change to what is suggested above, and the location of the message needs to change i.e. to the caller, not within the function itself.

Review comments need to be addressed before you repost patches....

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#10 lore raw

PATCH v3 3/3 xfs: Print error when unable to allocate inodes or out of free inodes.

In reply to [email protected]

From: Raghavendra D Prabhu <[email protected]>

When xfs_dialloc is unable to allocate required number of inodes due to global ceiling, or AGs are out of free inodes but not allowed to allocate inodes or unable to allocate without continguous free space, printk the error in ratelimited manner.

---
 fs/xfs/xfs_ialloc.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
fs/xfs/xfs_ialloc.c +24 -2
index e75a39d..e9f911b2 100644
@@ -991,7 +991,7 @@ xfs_dialloc(
 
 			xfs_perag_put(pag);
 			*inop = NULLFSINO;
-			return 0;
+			goto out_spc;
 		}
 
 		if (ialloced) {
@@ -1017,7 +1017,7 @@ nextag:
 			agno = 0;
 		if (agno == start_agno) {
 			*inop = NULLFSINO;
-			return noroom ? ENOSPC : 0;
+			goto out_spc;
 		}
 	}
 
@@ -1027,6 +1027,28 @@ out_alloc:
 out_error:
 	xfs_perag_put(pag);
 	return XFS_ERROR(error);
+out_spc:
+	if (noroom) {
+		xfs_err_ratelimited(mp, "Hit global inode ceiling:");
+		error = ENOSPC;
+	} else if (!okalloc) {
+		/*
+		 * implies noroom=0 && (!pag->pagi_freecount && !okalloc) for
+		 * all pag
+		 */
+		xfs_err_ratelimited(mp,
+			"No AGs with free inodes and allocation not allowed:");
+		error = 0;
+	} else {
+		xfs_err_ratelimited(mp,
+			"Unable to allocate continguous space for inodes:");
+		error = 0;
+	}
+
+	xfs_err_ratelimited(mp, "Required %d, Current %llu, Maximum %llu",
+		XFS_IALLOC_INODES(mp), mp->m_sb.sb_icount, mp->m_maxicount);
+	return error;
+
 }
 
 /*
Signature · 6 lines
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v3 3/3
#11 lore raw

Re: [v3, 3/3] xfs: Print error when unable to allocate inodes or out of free inodes.

Quoted 9 lines · Raghavendra D Prabhu

From: Raghavendra D Prabhu <[email protected]>

When xfs_dialloc is unable to allocate required number of inodes due to global ceiling, or AGs are out of free inodes but not allowed to allocate inodes or unable to allocate without continguous free space, printk the error in ratelimited manner.

Thanks Raghavendra,

Looks good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#12 lore raw

Re: [PATCH v3 3/3] xfs: Print error when unable to allocate inodes or out of free inodes.

In reply to [email protected]
Quoted 17 lines · On Wed, Sep 26, 2012 at 12:26:49PM +0530, [email protected] wrote:

From: Raghavendra D Prabhu <[email protected]>

When xfs_dialloc is unable to allocate required number of inodes due to global ceiling, or AGs are out of free inodes but not allowed to allocate inodes or unable to allocate without continguous free space, printk the error in ratelimited manner.

---
 fs/xfs/xfs_ialloc.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
fs/xfs/xfs_ialloc.c +0 -0
index e75a39d..e9f911b2 100644

fs/xfs/xfs_ialloc.c xfs_dialloc( · line 995

Quoted 6 lines
fs/xfs/xfs_ialloc.c +1 -1
@@ -991,7 +991,7 @@ xfs_dialloc(
 
 			xfs_perag_put(pag);
 			*inop = NULLFSINO;
-			return 0;
+			goto out_spc;
 		}

So this is the case where noroom = 0, okalloc = 1, error = ENOSPC.

This means we selected an AG that we could allocate new inodes in, but xfs_ialloc_ag_alloc() failed because we are now over the mp->m_maxicount. That's the only way it can return ENOSPC. More below....

Quoted 12 lines
fs/xfs/xfs_ialloc.c +1 -1
 		if (ialloced) {
@@ -1017,7 +1017,7 @@ nextag:
 			agno = 0;
 		if (agno == start_agno) {
 			*inop = NULLFSINO;
-			return noroom ? ENOSPC : 0;
+			goto out_spc;
 		}
 	}
 

fs/xfs/xfs_ialloc.c out_alloc: · line 1030

Quoted 4 lines
fs/xfs/xfs_ialloc.c +1 -0
@@ -1027,6 +1027,28 @@ out_alloc:
 out_error:
 	xfs_perag_put(pag);
 	return XFS_ERROR(error);
+out_spc:

Irrelevant given my next comments, but shouldn't that have been called "out_nospace"?

Quoted 6 lines
fs/xfs/xfs_ialloc.c +6 -0
+	if (noroom) {
+		xfs_err_ratelimited(mp, "Hit global inode ceiling:");
+		error = ENOSPC;
+	} else if (!okalloc) {
+		/*
+		 * implies noroom=0 && (!pag->pagi_freecount && !okalloc) for

fs/xfs/xfs_ialloc.c out_alloc: · line 1046

Quoted 10 lines
fs/xfs/xfs_ialloc.c +10 -0
+		 * all pag
+		 */
+		xfs_err_ratelimited(mp,
+			"No AGs with free inodes and allocation not allowed:");
+		error = 0;
+	} else {
+		xfs_err_ratelimited(mp,
+			"Unable to allocate continguous space for inodes:");
+		error = 0;
+	}

So for the first case we always get "Unable to allocate continguous space for inodes:". That's wrong (see above) because we've got the same error as if we were in the noroom case - allocation is not allowed as we are above the max inode count. i.e:

"Unable to locate free inodes. Allocation failure reason:" "Over global inode limit"

I think it is much better to issue the error message immediately and returning instead of jumping to this code. That way we'll know *exactly* what error occurred and it is simple to verify the message is, in fact, correct.

In the second case, for both noroom states the second message (the !okalloc message) is appropriate. We can be above the global inode ceiling and still have free inodes available for allocation, and we only fail if we are unable to locate free inodes for allocation. i.e:

"Unable to locate free inodes. Allocation failure reason:"

if (noroom) {
	"Over global inode limit"
	error = ENOSPC;

else if (!okalloc)
"Not allowed by caller"
else
"Insufficient contiguous free space is available"

This is where separating the error messages from the location that they are generated at is a bad idea - it's taken me 20 minutes of code reading to get to this point, and for a patch that adds a couple of error messages that's just, well, wrong.

If you are going to separate them write a small wrapper function that has the above code snippet in it and takes a couple of boolean flags to select the allocation failure reason....

fs/xfs/xfs_ialloc.c out_alloc: · line 1049

Quoted 3 lines
fs/xfs/xfs_ialloc.c +3 -0
+
+	xfs_err_ratelimited(mp, "Required %d, Current %llu, Maximum %llu",
+		XFS_IALLOC_INODES(mp), mp->m_sb.sb_icount, mp->m_maxicount);

That's not completely correct, as we only require a single inode to be allocated during this call. We only try to allocate an inode chunk when there are no existing free inodes, but we still only require 1 inode to be allocated to the caller. Hence I don't think this is necessary information - we can get if from the superblock if we really need it....

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#13 lore raw
In reply to [email protected]

Hi,

Checking back on this, whether it has been reviewed and if so, any comments.

Quoted 25 lines · On Wed, Sep 26, 2012 at 12:26 PM, <[email protected]> wrote:

From: Raghavendra D Prabhu <[email protected]>

Currently, when there are no free inodes left / free space to allocate them (usually without inode64), there is no indication anywhere of this case, making it harder to diagnose this case.

Hence, this series prints the causes/reasons to kernel log in a ratelimited manner, when such a situation arises.

Regarding why it is printed at callee location instead at caller, it gives
greater granularity in expressing the precise reason and give more details, and
also some along the path are not ENOSPC (such in xfs_ialloc where ialloc_context is not NULL but ino is) along with the fact that it (xfs_ialloc) is called at multiple sites, so to avoid duplication.

Version 1: Initial series.
Version 2: Added ratelimited printing to xfs_message and used that. Version 3: Kept the logic intact in few places, fixed the column requirement.

Raghavendra D Prabhu (3):
xfs: Add ratelimited printk for different alert levels
xfs: Print error when xfs_ialloc_ag_select fails to find continuous
free space.
xfs: Print error when unable to allocate inodes or out of free
inodes.

Quoted 8 lines
 fs/xfs/xfs_ialloc.c  | 31 ++++++++++++++++++++++++++++---
 fs/xfs/xfs_linux.h   |  1 +
 fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 3 deletions(-)

--
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#14 lore raw

Hey Raghu,

Thanks for contributing, I am reviewing and testing this now.

Regards
--Rich

Quoted 35 lines · Raghavendra Prabhu

Hi,

Checking back on this, whether it has been reviewed and if so, any comments.

Quoted 30 lines · On Wed, Sep 26, 2012 at 12:26 PM, <[email protected]> wrote:

From: Raghavendra D Prabhu <[email protected]>

Currently, when there are no free inodes left / free space to allocate them (usually without inode64), there is no indication anywhere of this case, making it harder to diagnose this case.

Hence, this series prints the causes/reasons to kernel log in a ratelimited manner, when such a situation arises.

Regarding why it is printed at callee location instead at caller, it gives
greater granularity in expressing the precise reason and give more details, and
also some along the path are not ENOSPC (such in xfs_ialloc where ialloc_context is not NULL but ino is) along with the fact that it (xfs_ialloc) is called at multiple sites, so to avoid duplication.

Version 1: Initial series.
Version 2: Added ratelimited printing to xfs_message and used that. Version 3: Kept the logic intact in few places, fixed the column requirement.

Raghavendra D Prabhu (3):
xfs: Add ratelimited printk for different alert levels
xfs: Print error when xfs_ialloc_ag_select fails to find continuous
free space.
xfs: Print error when unable to allocate inodes or out of free
inodes.

  fs/xfs/xfs_ialloc.c  | 31 ++++++++++++++++++++++++++++---
  fs/xfs/xfs_linux.h   |  1 +
  fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
  3 files changed, 55 insertions(+), 3 deletions(-)
Quoted 9 lines
Quoted 3 lines

--
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#15 lore raw
In reply to Raghavendra Prabhu
Quoted 35 lines · Raghavendra Prabhu

Hi,

Checking back on this, whether it has been reviewed and if so, any comments.

Quoted 30 lines · On Wed, Sep 26, 2012 at 12:26 PM, <[email protected]> wrote:

From: Raghavendra D Prabhu <[email protected]>

Currently, when there are no free inodes left / free space to allocate them (usually without inode64), there is no indication anywhere of this case, making it harder to diagnose this case.

Hence, this series prints the causes/reasons to kernel log in a ratelimited manner, when such a situation arises.

Regarding why it is printed at callee location instead at caller, it gives
greater granularity in expressing the precise reason and give more details, and
also some along the path are not ENOSPC (such in xfs_ialloc where ialloc_context is not NULL but ino is) along with the fact that it (xfs_ialloc) is called at multiple sites, so to avoid duplication.

Version 1: Initial series.
Version 2: Added ratelimited printing to xfs_message and used that. Version 3: Kept the logic intact in few places, fixed the column requirement.

Raghavendra D Prabhu (3):
xfs: Add ratelimited printk for different alert levels
xfs: Print error when xfs_ialloc_ag_select fails to find continuous
free space.
xfs: Print error when unable to allocate inodes or out of free
inodes.

  fs/xfs/xfs_ialloc.c  | 31 ++++++++++++++++++++++++++++---
  fs/xfs/xfs_linux.h   |  1 +
  fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
  3 files changed, 55 insertions(+), 3 deletions(-)
Quoted 9 lines
Quoted 3 lines

--
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Ben,

When you have a chance can you pull this series in. I have tested it and it looks good.

Thanks
--Rich

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#16 lore raw
Quoted 46 lines · Rich Johnston
Quoted 35 lines · Raghavendra Prabhu

Hi,

Checking back on this, whether it has been reviewed and if so, any comments.

Quoted 30 lines · On Wed, Sep 26, 2012 at 12:26 PM, <[email protected]> wrote:

From: Raghavendra D Prabhu <[email protected]>

Currently, when there are no free inodes left / free space to allocate them (usually without inode64), there is no indication anywhere of this case, making it harder to diagnose this case.

Hence, this series prints the causes/reasons to kernel log in a ratelimited manner, when such a situation arises.

Regarding why it is printed at callee location instead at caller, it gives
greater granularity in expressing the precise reason and give more details, and
also some along the path are not ENOSPC (such in xfs_ialloc where ialloc_context is not NULL but ino is) along with the fact that it (xfs_ialloc) is called at multiple sites, so to avoid duplication.

Version 1: Initial series.
Version 2: Added ratelimited printing to xfs_message and used that. Version 3: Kept the logic intact in few places, fixed the column requirement.

Raghavendra D Prabhu (3):
xfs: Add ratelimited printk for different alert levels
xfs: Print error when xfs_ialloc_ag_select fails to find continuous
free space.
xfs: Print error when unable to allocate inodes or out of free
inodes.

 fs/xfs/xfs_ialloc.c  | 31 ++++++++++++++++++++++++++++---
 fs/xfs/xfs_linux.h   |  1 +
 fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 3 deletions(-)
Quoted 9 lines
Quoted 3 lines

--
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Quoted 4 lines

Ben,

When you have a chance can you pull this series in. I have tested it and it looks good.

No, not yet. It doesn't address the comments I made in a previous iteration.

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#17 lore raw

Hi Dave,

Quoted 47 lines · Dave Chinner
Quoted 46 lines · Rich Johnston
Quoted 44 lines · Raghavendra Prabhu

Hi,

Checking back on this, whether it has been reviewed and if so, any comments.

Quoted 25 lines · On Wed, Sep 26, 2012 at 12:26 PM, <[email protected]> wrote:

From: Raghavendra D Prabhu <[email protected]>

Currently, when there are no free inodes left / free space to allocate them (usually without inode64), there is no indication anywhere of this case, making it harder to diagnose this case.

Hence, this series prints the causes/reasons to kernel log in a ratelimited manner, when such a situation arises.

Regarding why it is printed at callee location instead at caller, it gives
greater granularity in expressing the precise reason and give more details, and
also some along the path are not ENOSPC (such in xfs_ialloc where ialloc_context is not NULL but ino is) along with the fact that it (xfs_ialloc) is called at multiple sites, so to avoid duplication.

Version 1: Initial series.
Version 2: Added ratelimited printing to xfs_message and used that. Version 3: Kept the logic intact in few places, fixed the column requirement.

Raghavendra D Prabhu (3):
xfs: Add ratelimited printk for different alert levels
xfs: Print error when xfs_ialloc_ag_select fails to find continuous
free space.
xfs: Print error when unable to allocate inodes or out of free
inodes.

Quoted 8 lines
 fs/xfs/xfs_ialloc.c  | 31 ++++++++++++++++++++++++++++---
 fs/xfs/xfs_linux.h   |  1 +
 fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 3 deletions(-)

--
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Quoted 7 lines
Quoted 4 lines

Ben,

When you have a chance can you pull this series in. I have tested it and it looks good.

No, not yet. It doesn't address the comments I made in a previous iteration.

Ah, ok. We'll wait for Ragavendra to address your comments.

Regards,
Ben

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#18 lore raw
In reply to Raghavendra Prabhu
Quoted 3 lines · Raghavendra Prabhu

Hi,

Checking back on this, whether it has been reviewed and if so, any comments.

Please see Dave's comments down-thread, there are apparently still some unaddressed concerns. If you'd like to do a V4 I think this would be nice to get in.

-Eric

Quoted 31 lines · On Wed, Sep 26, 2012 at 12:26 PM, <[email protected]> wrote:
Quoted 30 lines

From: Raghavendra D Prabhu <[email protected]>

Currently, when there are no free inodes left / free space to allocate them (usually without inode64), there is no indication anywhere of this case, making it harder to diagnose this case.

Hence, this series prints the causes/reasons to kernel log in a ratelimited manner, when such a situation arises.

Regarding why it is printed at callee location instead at caller, it gives
greater granularity in expressing the precise reason and give more details, and
also some along the path are not ENOSPC (such in xfs_ialloc where ialloc_context is not NULL but ino is) along with the fact that it (xfs_ialloc) is called at multiple sites, so to avoid duplication.

Version 1: Initial series.
Version 2: Added ratelimited printing to xfs_message and used that. Version 3: Kept the logic intact in few places, fixed the column requirement.

Raghavendra D Prabhu (3):
xfs: Add ratelimited printk for different alert levels
xfs: Print error when xfs_ialloc_ag_select fails to find continuous
free space.
xfs: Print error when unable to allocate inodes or out of free
inodes.

 fs/xfs/xfs_ialloc.c  | 31 ++++++++++++++++++++++++++++---
 fs/xfs/xfs_linux.h   |  1 +
 fs/xfs/xfs_message.h | 26 ++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 3 deletions(-)
Quoted 9 lines
Quoted 3 lines

--
1.7.12.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs