From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 8/9] libfrog: create xfd_open function
Date: Wed, 4 Sep 2019 09:01:21 +1000 [thread overview]
Message-ID: <20190903230121.GZ1119@dread.disaster.area> (raw)
In-Reply-To: <156713887587.386621.8656028056753211579.stgit@magnolia>
On Thu, Aug 29, 2019 at 09:21:15PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Create a helper to open a file and initialize the xfd structure.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
....
>
> +/* Open a file on an XFS filesystem. Returns zero or a positive error code. */
> +int
> +xfd_open(
> + struct xfs_fd *xfd,
> + const char *pathname,
> + int flags)
> +{
> + int ret;
> +
> + xfd->fd = open(pathname, O_RDONLY);
open(pathname, flags)
And, to handle all future uses, shouldn't it also pass a mode?
Though I think that can be done as a separate patch when we need
O_RDWR for open....
Otherwise it looks ok.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2019-09-03 23:01 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 4:20 [PATCH v2 0/9] libxfrog: wrap version ioctl calls Darrick J. Wong
2019-08-30 4:20 ` [PATCH 1/9] libxfs: revert FSGEOMETRY v5 -> v4 hack Darrick J. Wong
2019-08-30 21:03 ` Allison Collins
2019-09-02 22:49 ` Dave Chinner
2019-09-03 6:14 ` Christoph Hellwig
2019-08-30 4:20 ` [PATCH 2/9] xfsprogs: update spdx tags in LICENSES/ Darrick J. Wong
2019-08-30 21:03 ` Allison Collins
2019-08-30 4:20 ` [PATCH 3/9] libfrog: refactor online geometry queries Darrick J. Wong
2019-08-30 21:03 ` Allison Collins
2019-09-03 22:51 ` Dave Chinner
2019-08-30 4:20 ` [PATCH 4/9] libfrog: introduce xfs_fd to wrap an fd to a file on an xfs filesystem Darrick J. Wong
2019-08-30 23:29 ` Allison Collins
2019-08-30 23:31 ` Darrick J. Wong
2019-09-03 22:53 ` Dave Chinner
2019-08-30 4:20 ` [PATCH 5/9] libfrog: store more inode and block geometry in struct xfs_fd Darrick J. Wong
2019-08-31 0:37 ` Allison Collins
2019-08-30 4:21 ` [PATCH 6/9] libfrog: create online fs geometry converters Darrick J. Wong
2019-08-31 5:11 ` Allison Collins
2019-09-03 22:55 ` Dave Chinner
2019-08-30 4:21 ` [PATCH 7/9] libfrog: refactor open-coded bulkstat calls Darrick J. Wong
2019-08-30 23:26 ` Darrick J. Wong
2019-08-31 0:42 ` [PATCH v2 " Darrick J. Wong
2019-09-03 22:57 ` Dave Chinner
2019-09-01 20:55 ` [PATCH " Allison Collins
2019-09-01 21:05 ` Darrick J. Wong
2019-08-30 4:21 ` [PATCH 8/9] libfrog: create xfd_open function Darrick J. Wong
2019-09-01 20:55 ` Allison Collins
2019-09-03 23:01 ` Dave Chinner [this message]
2019-09-03 23:37 ` Darrick J. Wong
2019-08-30 4:21 ` [PATCH 9/9] libfrog: refactor open-coded INUMBERS calls Darrick J. Wong
2019-09-01 20:55 ` Allison Collins
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=20190903230121.GZ1119@dread.disaster.area \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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;
as well as URLs for NNTP newsgroup(s).