Linux-ext4 Archive on lore.kernel.org
 help / color / Atom feed
* About BUFFER_TRACE macro in include/linux/jbd2.h
@ 2020-01-06  8:30 Ritesh Harjani
  2020-01-07 22:12 ` Andreas Dilger
  0 siblings, 1 reply; 2+ messages in thread
From: Ritesh Harjani @ 2020-01-06  8:30 UTC (permalink / raw)
  To: linux-ext4

Hello Community,

A very happy new year to all of you!! :)

Had some query on BUFFER_TRACE macro. Here it goes:-

While debugging some issue w.r.t jbd2/bh I came across this empty macro
definition of BUFFER_TRACE in include/linux/jbd2.h.
Though this is called from multiple places, but I could not find any
definition of this as such.

I could see some patches on mailing list which are still calling this
macro. So that means I am definitely missing something here.

Could you please help me understand how can one use this "BUFFER_TRACE"
macro for debugging? I could not find any ftrace event related
to this macro.

For my debugging as of now I ended up creating a file in
include/trace/events/buffer_debug.h and added the definition
of BUFFER_TRACE macro there.

On more googling I did find some old patch which enabled 
CONFIG_BUFFER_DEBUG.
http://people.redhat.com/sct/patches/ext3-2.4/for-2.4.19/98-debug/00-ext3-debug.patch
But this seemed pretty old and I could not find anything latest on this
which is related to above patch.

Any pointers pls?

-ritesh


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: About BUFFER_TRACE macro in include/linux/jbd2.h
  2020-01-06  8:30 About BUFFER_TRACE macro in include/linux/jbd2.h Ritesh Harjani
@ 2020-01-07 22:12 ` Andreas Dilger
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Dilger @ 2020-01-07 22:12 UTC (permalink / raw)
  To: Ritesh Harjani; +Cc: linux-ext4

Hi Ritesh,
There were somewhat patch versions posted by Andrew Morton (akpm)
that may have more functionality.

Note that the block layer no longer needs to be patched for this to be
used. Instead you can use dm-flakey to cause it to discard writes to the
block device. 

Cheers, Andreas

> On Jan 6, 2020, at 01:30, Ritesh Harjani <riteshh@linux.ibm.com> wrote:
> 
> Hello Community,
> 
> A very happy new year to all of you!! :)
> 
> Had some query on BUFFER_TRACE macro. Here it goes:-
> 
> While debugging some issue w.r.t jbd2/bh I came across this empty macro
> definition of BUFFER_TRACE in include/linux/jbd2.h.
> Though this is called from multiple places, but I could not find any
> definition of this as such.
> 
> I could see some patches on mailing list which are still calling this
> macro. So that means I am definitely missing something here.
> 
> Could you please help me understand how can one use this "BUFFER_TRACE"
> macro for debugging? I could not find any ftrace event related
> to this macro.
> 
> For my debugging as of now I ended up creating a file in
> include/trace/events/buffer_debug.h and added the definition
> of BUFFER_TRACE macro there.
> 
> On more googling I did find some old patch which enabled CONFIG_BUFFER_DEBUG.
> http://people.redhat.com/sct/patches/ext3-2.4/for-2.4.19/98-debug/00-ext3-debug.patch
> But this seemed pretty old and I could not find anything latest on this
> which is related to above patch.
> 
> Any pointers pls?
> 
> -ritesh
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06  8:30 About BUFFER_TRACE macro in include/linux/jbd2.h Ritesh Harjani
2020-01-07 22:12 ` Andreas Dilger

Linux-ext4 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ext4/0 linux-ext4/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ext4 linux-ext4/ https://lore.kernel.org/linux-ext4 \
		linux-ext4@vger.kernel.org
	public-inbox-index linux-ext4

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ext4


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git