debugfs directory structure
Hi Greg,
Now that debugfs is merged into Linus's tree, I'm looking at using it to replace the IPoIB debugging pseudo-filesystem (ipoib_debugfs). Is there any guidance on what the structure of debugfs should look like? Right now I'm planning on putting all the debug info files under an ipoib/ top level directory. Does that sound reasonable?
Thanks,
Roland
Quoted 7 lines · Roland Dreier
Hi Greg,
Now that debugfs is merged into Linus's tree, I'm looking at using it to replace the IPoIB debugging pseudo-filesystem (
ipoib_debugfs). Is there any guidance on what the structure of debugfs should look like? Right now I'm planning on putting all the debug info files under an ipoib/ top level directory. Does that sound reasonable?
How about mirroring the toplevel kernel source structure ?
Ie, you'd make drivers/infiniband/ulp/ipoib ?
It could get ugly quickly without some structure at least to the toplevel dir.
Dave
Quoted 9 lines · Dave Jones
Quoted 7 lines · Roland Dreier
Hi Greg,
Now that debugfs is merged into Linus's tree, I'm looking at using it to replace the IPoIB debugging pseudo-filesystem (
ipoib_debugfs). Is there any guidance on what the structure of debugfs should look like? Right now I'm planning on putting all the debug info files under an ipoib/ top level directory. Does that sound reasonable?
Quoted 3 lines
How about mirroring the toplevel kernel source structure ?
Ie, you'd make
drivers/infiniband/ulp/ipoib?
But who would be in charge of createing the "drivers/" subdirectory?
debugfs can't handle "/" in a directory name, like procfs does.
Quoted 2 lines
It could get ugly quickly without some structure at least to the toplevel dir.
I say ipoib/ is fine, remember, this is for debugging stuff, it will quickly get ugly anyway :)
thanks,
greg k-h
Quoted 10 lines · Greg KH
Quoted 9 lines · Dave Jones
Quoted 7 lines · Roland Dreier
Hi Greg,
Now that debugfs is merged into Linus's tree, I'm looking at using it to replace the IPoIB debugging pseudo-filesystem (
ipoib_debugfs). Is there any guidance on what the structure of debugfs should look like? Right now I'm planning on putting all the debug info files under an ipoib/ top level directory. Does that sound reasonable?
Quoted 6 lines
Quoted 3 lines
How about mirroring the toplevel kernel source structure ?
Ie, you'd make
drivers/infiniband/ulp/ipoib?But who would be in charge of createing the "
drivers/" subdirectory? debugfs can't handle "/" in a directory name, like procfs does.
maybe it should ?
Quoted 4 lines
Quoted 2 lines
It could get ugly quickly without some structure at least to the toplevel dir.
I say ipoib/ is fine, remember, this is for debugging stuff, it will quickly get ugly anyway :)
with no heirarchy, what happens when two drivers want to make the same directory / filenames ?
Dave
Quoted 11 lines · Dave Jones
Quoted 10 lines · Greg KH
Quoted 9 lines · Dave Jones
Quoted 7 lines · Roland Dreier
Hi Greg,
Now that debugfs is merged into Linus's tree, I'm looking at using it to replace the IPoIB debugging pseudo-filesystem (
ipoib_debugfs). Is there any guidance on what the structure of debugfs should look like? Right now I'm planning on putting all the debug info files under an ipoib/ top level directory. Does that sound reasonable?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
How about mirroring the toplevel kernel source structure ?
Ie, you'd make
drivers/infiniband/ulp/ipoib?But who would be in charge of createing the "
drivers/" subdirectory? debugfs can't handle "/" in a directory name, like procfs does.maybe it should ?
Right now debugfs is dentry based, not string based. If someone wants to send me patches to change it, I'll reconsider it :)
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
It could get ugly quickly without some structure at least to the toplevel dir.
I say ipoib/ is fine, remember, this is for debugging stuff, it will quickly get ugly anyway :)
with no heirarchy, what happens when two drivers want to make the same directory / filenames ?
The second call will fail. Code should always check return values, right?
thanks,
greg k-h
Quoted 4 lines · Roland Dreier
Hi Greg,
Now that debugfs is merged into Linus's tree, I'm looking at using it to replace the IPoIB debugging pseudo-filesystem (
ipoib_debugfs).
Great!
Quoted 4 lines
Is
there any guidance on what the structure of debugfs should look like? Right now I'm planning on putting all the debug info files under an ipoib/ top level directory. Does that sound reasonable?
Anarchy rules in debugfs. Do what you want. If you stomp over someone else's stuff, I expect complaints and maybe someone will have to arbitrate, but odds are that will ever happen is pretty slim.
So yes, ipoib/ in the top level sounds just fine.
thanks,
greg k-h