mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: liaoweixiong <liaoweixiong@allwinnertech.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	Kees Cook <keescook@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Arnd Bergmann <arnd@arndb.de>, Rob Herring <robh@kernel.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v12 2/4] pstore/blk: add blkoops for pstore_blk
Date: Thu, 7 Mar 2019 09:01:33 +0800	[thread overview]
Message-ID: <de396c69-0ae5-d594-393a-be77bf80a304@allwinnertech.com> (raw)
In-Reply-To: <21827ba0-1c89-c16e-0d64-0a508eeae915@infradead.org>

Hi,

I will fix all on next version. Thank you very much.

On 2019-03-06 09:14, Randy Dunlap wrote:
> Hi,
> 
> On 2/27/19 11:12 PM, liaoweixiong wrote:
>> diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
>> index defcb75..7dfe00b 100644
>> --- a/fs/pstore/Kconfig
>> +++ b/fs/pstore/Kconfig
>> @@ -160,3 +160,117 @@ config PSTORE_BLK
>>  	help
>>  	  This enables panic and oops message to be logged to a block dev
>>  	  where it can be read back at some later point.
>> +
>> +config PSTORE_BLKOOPS
>> +	tristate "pstore block with oops logger"
>> +	depends on PSTORE_BLK
>> +	help
>> +	  This is a sample for pstore block with oops logger.
>> +
>> +	  It CANNOT record panic log as no read/write apis for panic registered.
> 
> 	                                              APIs
> 

Fixed.

>> +
>> +	  It CAN record oops log even power failure if
>> +	  "PSTORE_BLKOOPS_BLKDEV" on Kconfig or "block-device" on dts or
>> +	  "blkdev" on module parameter is valid.
>> +
>> +	  Otherwise, it can only record data to ram buffer, which will be
>> +	  dropped when reboot.
> 
> 	  dropped on reboot.
> or
> 	  dropped when rebooting.
> 

Fixed.

>> +
>> +	  NOTE that, there are three ways to set parameters of blkoops and
>> +	  prioritize according to configuration flexibility. That is
>> +	  Kconfig < device tree < module parameters. It means that the value can
>> +	  be overwritten by higher priority settings.
>> +	  1. Kconfig
>> +	     It	just sets a default value.
>> +	  2. device tree
>> +	     It is set on device tree, which will overwrites value from Kconfig,
> 
> 	                                          overwrite the value from Kconfig,
> 

Fixed.

>> +	     but can also be overwritten by module parameters.
>> +	  3. module parameters
>> +	     It is the first priority. Take care of that blkoops will take lower
>> +	     priority settings if higher priority one do not set.
>> +
>> +config PSTORE_BLKOOPS_DMESG_SIZE
>> +	int "dmesg size in kbytes for blkoops"
>> +	depends on PSTORE_BLKOOPS
>> +	default 64
>> +	help
>> +	  This just sets size of dmesg (dmesg_size) for pstore/blk. The value
>> +	  must be a multiple of 4096.
>> +
>> +	  NOTE that, there are three ways to set parameters of blkoops and
>> +	  prioritize according to configuration flexibility. That is
>> +	  Kconfig < device tree < module parameters. It means that the value can
>> +	  be overwritten by higher priority settings.
>> +	  1. Kconfig
>> +	     It	just sets a default value.
>> +	  2. device tree
>> +	     It is set on device tree, which will overwrites value from Kconfig,
> 
> 	                                          overwrite the value from Kconfig,
> 

It cancels device tree support. I forget to delete it.

>> +	     but can also be overwritten by module parameters.
>> +	  3. module parameters
>> +	     It is the first priority. Take care of that blkoops will take lower
>> +	     priority settings if higher priority one do not set.
>> +
>> +config PSTORE_BLKOOPS_TOTAL_SIZE
>> +	int "total size in kbytes for blkoops"
>> +	depends on PSTORE_BLKOOPS
>> +	default 0
>> +	help
>> +	  The total size in kbytes pstore/blk can use. It must be less than or
>> +	  equal to size of block device if @blkdev valid. If @total_size is zero
>> +	  with @blkdev, @total_size will be set to equal to size of @blkdev.
> 
> 	                                    set equal to size of @blkdev.
> 

Fixed.

>> +	  The value must be a multiple of 4096.
>> +
>> +	  NOTE that, there are three ways to set parameters of blkoops and
>> +	  prioritize according to configuration flexibility. That is
>> +	  Kconfig < device tree < module parameters. It means that the value can
>> +	  be overwritten by higher priority settings.
>> +	  1. Kconfig
>> +	     It	just sets a default value.
>> +	  2. device tree
>> +	     It is set on device tree, which will overwrites value from Kconfig,
> 
> 	                                          overwrite the value from Kconfig,
> 

Fixed.

>> +	     but can also be overwritten by module parameters.
>> +	  3. module parameters
>> +	     It is the first priority. Take care of that blkoops will take lower
>> +	     priority settings if higher priority one do not set.
>> +
>> +config PSTORE_BLKOOPS_BLKDEV
>> +	string "block device for blkoops"
>> +	depends on PSTORE_BLKOOPS
>> +	default ""
>> +	help
>> +	  This just sets block device (blkdev) for pstore/blk. Pstore/blk
>> +	  will record data to this block device to avoid losing data due to
>> +	  power failure. So, If it is not set, pstore/blk will drop all data
> 
> 	                     if
> 

Fixed.

>> +	  when reboot.
> 
> 	  on reboot.
> 

Fixed.

>> +
>> +	  It accpet the following variants:
> 
> 	     accepts
> 

Fixed.

>> +	  1) <hex_major><hex_minor> device number in hexadecimal represents
>> +	     itself no leading 0x, for example b302.
>> +	  2) /dev/<disk_name> represents the device number of disk
>> +	  3) /dev/<disk_name><decimal> represents the device number
>> +	     of partition - device number of disk plus the partition number
>> +	  4) /dev/<disk_name>p<decimal> - same as the above, that form is
> 
> 	                                              above; this form is
> 

Fixed.

>> +	     used when disk name of partitioned disk ends on a digit.
> 
> 	                                             ends with a digit.
> 

Fixed.

>> +	  5) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the
>> +	     unique id of a partition if the partition table provides it.
>> +	     The UUID may be either an EFI/GPT UUID, or refer to an MSDOS
>> +	     partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero-
>> +	     filled hex representation of the 32-bit "NT disk signature", and PP
>> +	     is a zero-filled hex representation of the 1-based partition number.
>> +	  6) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation
>> +	     to a partition with a known unique id.
>> +	  7) <major>:<minor> major and minor number of the device separated by
>> +	     a colon.
>> +
>> +	  NOTE that, there are three ways to set parameters of blkoops and
>> +	  prioritize according to configuration flexibility. That is
>> +	  Kconfig < device tree < module parameters. It means that the value can
>> +	  be overwritten by higher priority settings.
>> +	  1. Kconfig
>> +	     It	just sets a default value.
>> +	  2. device tree
>> +	     It is set on device tree, which will overwrites value from Kconfig,
> 
> 	                                          overwrite the value from Kconfig,
> 

Fixed.

>> +	     but can also be overwritten by module parameters.
>> +	  3. module parameters
>> +	     It is the first priority. Take care of that blkoops will take lower
>> +	     priority settings if higher priority one do not set.
> 
> 

-- 
liaoweixiong

  reply	other threads:[~2019-03-07  1:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  7:12 [PATCH v12 0/4] pstore/block: new support logger for block devices liaoweixiong
2019-02-28  7:12 ` [PATCH v12 1/4] pstore/blk: " liaoweixiong
2019-03-05  7:12   ` Dan Carpenter
2019-03-05 12:29     ` liaoweixiong
2019-02-28  7:12 ` [PATCH v12 2/4] pstore/blk: add blkoops for pstore_blk liaoweixiong
2019-03-06  1:14   ` Randy Dunlap
2019-03-07  1:01     ` liaoweixiong [this message]
2019-02-28  7:12 ` [PATCH v12 3/4] pstore/blk: support pmsg for pstore block liaoweixiong
2019-03-06  1:16   ` Randy Dunlap
2019-03-07  1:05     ` liaoweixiong
2019-02-28  7:12 ` [PATCH v12 4/4] Documentation: pstore/blk: create document for pstore_blk liaoweixiong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de396c69-0ae5-d594-393a-be77bf80a304@allwinnertech.com \
    --to=liaoweixiong@allwinnertech.com \
    --cc=anton@enomsg.org \
    --cc=arnd@arndb.de \
    --cc=ccross@android.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®