summaryrefslogtreecommitdiffstats
path: root/drivers/block/rnbd/rnbd-srv-dev.h
blob: 328dc915832cde75e38c52e56c86d00b97378efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * RDMA Network Block Driver
 *
 * Copyright (c) 2014 - 2018 ProfitBricks GmbH. All rights reserved.
 * Copyright (c) 2018 - 2019 1&1 IONOS Cloud GmbH. All rights reserved.
 * Copyright (c) 2019 - 2020 1&1 IONOS SE. All rights reserved.
 */
#ifndef RNBD_SRV_DEV_H
#define RNBD_SRV_DEV_H

#include <linux/fs.h>
#include "rnbd-proto.h"

struct rnbd_dev {
	struct block_device	*bdev;
	fmode_t			blk_open_flags;
};

/**
 * rnbd_dev_open() - Open a device
 * @path:	path to open
 * @flags:	open flags
 */
struct rnbd_dev *rnbd_dev_open(const char *path, fmode_t flags);

/**
 * rnbd_dev_close() - Close a device
 */
void rnbd_dev_close(struct rnbd_dev *dev);

#endif /* RNBD_SRV_DEV_H */