public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Andre Noll <maan@tuebingen.mpg.de>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/4] xfs_restore: refactor open-coded file creation code
Date: Fri, 22 Feb 2019 20:20:53 +0100	[thread overview]
Message-ID: <20190222192053.GF15048@tuebingen.mpg.de> (raw)
In-Reply-To: <155085404462.5141.11851529133557195388.stgit@magnolia>

[-- Attachment #1: Type: text/plain, Size: 740 bytes --]

On Fri, Feb 22, 08:47, Darrick J. Wong wrote
> +	ret = ioctl(fd, XFS_IOC_RESVSP64, &fl);
> +	if (ret && errno != ENOTTY)
> +		mlog(MLOG_VERBOSE | MLOG_NOTE,
> +_("attempt to reserve %lld bytes for %s using %s failed: %s (%d)\n"),
> +				size, pathname, "XFS_IOC_RESVSP64",
> +				strerror(errno), errno);

The "XFS_IOC_RESVSP64" string literal can be included in the format string.

> +	if (ret == 0)
> +		goto done;
> +
> +done:

LOL

> +	return fd;

If you really want to return success even if the ioctl() failed, this might
deserve a comment.

Andre
-- 
Max Planck Institute for Developmental Biology
Max-Planck-Ring 5, 72076 Tübingen, Germany. Phone: (+49) 7071 601 829
http://people.tuebingen.mpg.de/maan/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2019-02-22 19:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 16:47 [PATCH 0/4] xfsdump: update to use fallocate Darrick J. Wong
2019-02-22 16:47 ` [PATCH 1/4] xfs_restore: refactor open-coded file creation code Darrick J. Wong
2019-02-22 19:20   ` Andre Noll [this message]
2019-02-22 19:28     ` Darrick J. Wong
2019-02-22 19:55       ` Andre Noll
2019-05-07  0:11   ` Allison Collins
2019-05-20 21:05     ` Darrick J. Wong
2019-02-22 16:47 ` [PATCH 2/4] xfs_restore: check return value Darrick J. Wong
2019-05-07  0:11   ` Allison Collins
2019-02-22 16:47 ` [PATCH 3/4] xfs_restore: fix unsupported ioctl detection Darrick J. Wong
2019-05-07  0:11   ` Allison Collins
2019-02-22 16:47 ` [PATCH 4/4] xfs_restore: support fallocate when reserving space for a file Darrick J. Wong
2019-05-07  0:11   ` Allison Collins
2019-05-06 18:24 ` [PATCH 0/4] xfsdump: update to use fallocate Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2019-08-20 20:21 Darrick J. Wong
2019-08-20 20:21 ` [PATCH 1/4] xfs_restore: refactor open-coded file creation code Darrick J. Wong

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=20190222192053.GF15048@tuebingen.mpg.de \
    --to=maan@tuebingen.mpg.de \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /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