Add scrub after resilver zed script
[zfs.git] / cmd / zed / zed_file.h
blob05f360d20efd64b840c615950f1537d899161592
1 /*
2 * This file is part of the ZFS Event Daemon (ZED)
3 * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
4 * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
5 * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
6 * Refer to the ZoL git commit log for authoritative copyright attribution.
8 * The contents of this file are subject to the terms of the
9 * Common Development and Distribution License Version 1.0 (CDDL-1.0).
10 * You can obtain a copy of the license from the top-level file
11 * "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>.
12 * You may not use this file except in compliance with the license.
15 #ifndef ZED_FILE_H
16 #define ZED_FILE_H
18 #include <sys/types.h>
19 #include <unistd.h>
21 ssize_t zed_file_read_n(int fd, void *buf, size_t n);
23 ssize_t zed_file_write_n(int fd, void *buf, size_t n);
25 int zed_file_lock(int fd);
27 int zed_file_unlock(int fd);
29 pid_t zed_file_is_locked(int fd);
31 void zed_file_close_from(int fd);
33 int zed_file_close_on_exec(int fd);
35 #endif /* !ZED_FILE_H */