file.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. /*
  2. * linux/fs/ext4/file.c
  3. *
  4. * Copyright (C) 1992, 1993, 1994, 1995
  5. * Remy Card (card@masi.ibp.fr)
  6. * Laboratoire MASI - Institut Blaise Pascal
  7. * Universite Pierre et Marie Curie (Paris VI)
  8. *
  9. * from
  10. *
  11. * linux/fs/minix/file.c
  12. *
  13. * Copyright (C) 1991, 1992 Linus Torvalds
  14. *
  15. * ext4 fs regular file handling primitives
  16. *
  17. * 64-bit file support on 64-bit platforms by Jakub Jelinek
  18. * (jj@sunsite.ms.mff.cuni.cz)
  19. */
  20. #include <linux/time.h>
  21. #include <linux/fs.h>
  22. #include <linux/jbd2.h>
  23. #include <linux/mount.h>
  24. #include <linux/path.h>
  25. #include <linux/quotaops.h>
  26. #include <linux/pagevec.h>
  27. #include "ext4.h"
  28. #include "ext4_jbd2.h"
  29. #include "xattr.h"
  30. #include "acl.h"
  31. /*
  32. * Called when an inode is released. Note that this is different
  33. * from ext4_file_open: open gets called at every open, but release
  34. * gets called only when /all/ the files are closed.
  35. */
  36. static int ext4_release_file(struct inode *inode, struct file *filp)
  37. {
  38. if (ext4_test_inode_state(inode, EXT4_STATE_DA_ALLOC_CLOSE)) {
  39. ext4_alloc_da_blocks(inode);
  40. ext4_clear_inode_state(inode, EXT4_STATE_DA_ALLOC_CLOSE);
  41. }
  42. /* if we are the last writer on the inode, drop the block reservation */
  43. if ((filp->f_mode & FMODE_WRITE) &&
  44. (atomic_read(&inode->i_writecount) == 1) &&
  45. !EXT4_I(inode)->i_reserved_data_blocks)
  46. {
  47. down_write(&EXT4_I(inode)->i_data_sem);
  48. ext4_discard_preallocations(inode);
  49. up_write(&EXT4_I(inode)->i_data_sem);
  50. }
  51. if (is_dx(inode) && filp->private_data)
  52. ext4_htree_free_dir_info(filp->private_data);
  53. return 0;
  54. }
  55. void ext4_unwritten_wait(struct inode *inode)
  56. {
  57. wait_queue_head_t *wq = ext4_ioend_wq(inode);
  58. wait_event(*wq, (atomic_read(&EXT4_I(inode)->i_unwritten) == 0));
  59. }
  60. /*
  61. * This tests whether the IO in question is block-aligned or not.
  62. * Ext4 utilizes unwritten extents when hole-filling during direct IO, and they
  63. * are converted to written only after the IO is complete. Until they are
  64. * mapped, these blocks appear as holes, so dio_zero_block() will assume that
  65. * it needs to zero out portions of the start and/or end block. If 2 AIO
  66. * threads are at work on the same unwritten block, they must be synchronized
  67. * or one thread will zero the other's data, causing corruption.
  68. */
  69. static int
  70. ext4_unaligned_aio(struct inode *inode, const struct iovec *iov,
  71. unsigned long nr_segs, loff_t pos)
  72. {
  73. struct super_block *sb = inode->i_sb;
  74. int blockmask = sb->s_blocksize - 1;
  75. size_t count = iov_length(iov, nr_segs);
  76. loff_t final_size = pos + count;
  77. if (pos >= inode->i_size)
  78. return 0;
  79. if ((pos & blockmask) || (final_size & blockmask))
  80. return 1;
  81. return 0;
  82. }
  83. static ssize_t
  84. ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
  85. unsigned long nr_segs, loff_t pos)
  86. {
  87. struct file *file = iocb->ki_filp;
  88. struct inode *inode = file->f_mapping->host;
  89. struct blk_plug plug;
  90. int unaligned_aio = 0;
  91. ssize_t ret;
  92. int overwrite = 0;
  93. size_t length = iov_length(iov, nr_segs);
  94. if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS) &&
  95. !is_sync_kiocb(iocb))
  96. unaligned_aio = ext4_unaligned_aio(inode, iov, nr_segs, pos);
  97. /* Unaligned direct AIO must be serialized; see comment above */
  98. if (unaligned_aio) {
  99. static unsigned long unaligned_warn_time;
  100. /* Warn about this once per day */
  101. if (printk_timed_ratelimit(&unaligned_warn_time, 60*60*24*HZ))
  102. ext4_msg(inode->i_sb, KERN_WARNING,
  103. "Unaligned AIO/DIO on inode %ld by %s; "
  104. "performance will be poor.",
  105. inode->i_ino, current->comm);
  106. mutex_lock(ext4_aio_mutex(inode));
  107. ext4_unwritten_wait(inode);
  108. }
  109. BUG_ON(iocb->ki_pos != pos);
  110. mutex_lock(&inode->i_mutex);
  111. blk_start_plug(&plug);
  112. iocb->private = &overwrite;
  113. /* check whether we do a DIO overwrite or not */
  114. if (ext4_should_dioread_nolock(inode) && !unaligned_aio &&
  115. !file->f_mapping->nrpages && pos + length <= i_size_read(inode)) {
  116. struct ext4_map_blocks map;
  117. unsigned int blkbits = inode->i_blkbits;
  118. int err, len;
  119. map.m_lblk = pos >> blkbits;
  120. map.m_len = (EXT4_BLOCK_ALIGN(pos + length, blkbits) >> blkbits)
  121. - map.m_lblk;
  122. len = map.m_len;
  123. err = ext4_map_blocks(NULL, inode, &map, 0);
  124. /*
  125. * 'err==len' means that all of blocks has been preallocated no
  126. * matter they are initialized or not. For excluding
  127. * uninitialized extents, we need to check m_flags. There are
  128. * two conditions that indicate for initialized extents.
  129. * 1) If we hit extent cache, EXT4_MAP_MAPPED flag is returned;
  130. * 2) If we do a real lookup, non-flags are returned.
  131. * So we should check these two conditions.
  132. */
  133. if (err == len && (map.m_flags & EXT4_MAP_MAPPED))
  134. overwrite = 1;
  135. }
  136. ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos);
  137. mutex_unlock(&inode->i_mutex);
  138. if (ret > 0 || ret == -EIOCBQUEUED) {
  139. ssize_t err;
  140. err = generic_write_sync(file, pos, ret);
  141. if (err < 0 && ret > 0)
  142. ret = err;
  143. }
  144. blk_finish_plug(&plug);
  145. if (unaligned_aio)
  146. mutex_unlock(ext4_aio_mutex(inode));
  147. return ret;
  148. }
  149. static ssize_t
  150. ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
  151. unsigned long nr_segs, loff_t pos)
  152. {
  153. struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
  154. ssize_t ret;
  155. /*
  156. * If we have encountered a bitmap-format file, the size limit
  157. * is smaller than s_maxbytes, which is for extent-mapped files.
  158. */
  159. if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
  160. struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
  161. size_t length = iov_length(iov, nr_segs);
  162. if ((pos > sbi->s_bitmap_maxbytes ||
  163. (pos == sbi->s_bitmap_maxbytes && length > 0)))
  164. return -EFBIG;
  165. if (pos + length > sbi->s_bitmap_maxbytes) {
  166. nr_segs = iov_shorten((struct iovec *)iov, nr_segs,
  167. sbi->s_bitmap_maxbytes - pos);
  168. }
  169. }
  170. if (unlikely(iocb->ki_filp->f_flags & O_DIRECT))
  171. ret = ext4_file_dio_write(iocb, iov, nr_segs, pos);
  172. else
  173. ret = generic_file_aio_write(iocb, iov, nr_segs, pos);
  174. return ret;
  175. }
  176. static const struct vm_operations_struct ext4_file_vm_ops = {
  177. .fault = filemap_fault,
  178. .page_mkwrite = ext4_page_mkwrite,
  179. .remap_pages = generic_file_remap_pages,
  180. };
  181. static int ext4_file_mmap(struct file *file, struct vm_area_struct *vma)
  182. {
  183. struct address_space *mapping = file->f_mapping;
  184. if (!mapping->a_ops->readpage)
  185. return -ENOEXEC;
  186. file_accessed(file);
  187. vma->vm_ops = &ext4_file_vm_ops;
  188. return 0;
  189. }
  190. static int ext4_file_open(struct inode * inode, struct file * filp)
  191. {
  192. struct super_block *sb = inode->i_sb;
  193. struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
  194. struct ext4_inode_info *ei = EXT4_I(inode);
  195. struct vfsmount *mnt = filp->f_path.mnt;
  196. struct path path;
  197. char buf[64], *cp;
  198. if (unlikely(!(sbi->s_mount_flags & EXT4_MF_MNTDIR_SAMPLED) &&
  199. !(sb->s_flags & MS_RDONLY))) {
  200. sbi->s_mount_flags |= EXT4_MF_MNTDIR_SAMPLED;
  201. /*
  202. * Sample where the filesystem has been mounted and
  203. * store it in the superblock for sysadmin convenience
  204. * when trying to sort through large numbers of block
  205. * devices or filesystem images.
  206. */
  207. memset(buf, 0, sizeof(buf));
  208. path.mnt = mnt;
  209. path.dentry = mnt->mnt_root;
  210. cp = d_path(&path, buf, sizeof(buf));
  211. if (!IS_ERR(cp)) {
  212. handle_t *handle;
  213. int err;
  214. handle = ext4_journal_start_sb(sb, 1);
  215. if (IS_ERR(handle))
  216. return PTR_ERR(handle);
  217. err = ext4_journal_get_write_access(handle, sbi->s_sbh);
  218. if (err) {
  219. ext4_journal_stop(handle);
  220. return err;
  221. }
  222. strlcpy(sbi->s_es->s_last_mounted, cp,
  223. sizeof(sbi->s_es->s_last_mounted));
  224. ext4_handle_dirty_super(handle, sb);
  225. ext4_journal_stop(handle);
  226. }
  227. }
  228. /*
  229. * Set up the jbd2_inode if we are opening the inode for
  230. * writing and the journal is present
  231. */
  232. if (sbi->s_journal && !ei->jinode && (filp->f_mode & FMODE_WRITE)) {
  233. struct jbd2_inode *jinode = jbd2_alloc_inode(GFP_KERNEL);
  234. spin_lock(&inode->i_lock);
  235. if (!ei->jinode) {
  236. if (!jinode) {
  237. spin_unlock(&inode->i_lock);
  238. return -ENOMEM;
  239. }
  240. ei->jinode = jinode;
  241. jbd2_journal_init_jbd_inode(ei->jinode, inode);
  242. jinode = NULL;
  243. }
  244. spin_unlock(&inode->i_lock);
  245. if (unlikely(jinode != NULL))
  246. jbd2_free_inode(jinode);
  247. }
  248. return dquot_file_open(inode, filp);
  249. }
  250. /*
  251. * Here we use ext4_map_blocks() to get a block mapping for a extent-based
  252. * file rather than ext4_ext_walk_space() because we can introduce
  253. * SEEK_DATA/SEEK_HOLE for block-mapped and extent-mapped file at the same
  254. * function. When extent status tree has been fully implemented, it will
  255. * track all extent status for a file and we can directly use it to
  256. * retrieve the offset for SEEK_DATA/SEEK_HOLE.
  257. */
  258. /*
  259. * When we retrieve the offset for SEEK_DATA/SEEK_HOLE, we would need to
  260. * lookup page cache to check whether or not there has some data between
  261. * [startoff, endoff] because, if this range contains an unwritten extent,
  262. * we determine this extent as a data or a hole according to whether the
  263. * page cache has data or not.
  264. */
  265. static int ext4_find_unwritten_pgoff(struct inode *inode,
  266. int origin,
  267. struct ext4_map_blocks *map,
  268. loff_t *offset)
  269. {
  270. struct pagevec pvec;
  271. unsigned int blkbits;
  272. pgoff_t index;
  273. pgoff_t end;
  274. loff_t endoff;
  275. loff_t startoff;
  276. loff_t lastoff;
  277. int found = 0;
  278. blkbits = inode->i_sb->s_blocksize_bits;
  279. startoff = *offset;
  280. lastoff = startoff;
  281. endoff = (map->m_lblk + map->m_len) << blkbits;
  282. index = startoff >> PAGE_CACHE_SHIFT;
  283. end = endoff >> PAGE_CACHE_SHIFT;
  284. pagevec_init(&pvec, 0);
  285. do {
  286. int i, num;
  287. unsigned long nr_pages;
  288. num = min_t(pgoff_t, end - index, PAGEVEC_SIZE);
  289. nr_pages = pagevec_lookup(&pvec, inode->i_mapping, index,
  290. (pgoff_t)num);
  291. if (nr_pages == 0) {
  292. if (origin == SEEK_DATA)
  293. break;
  294. BUG_ON(origin != SEEK_HOLE);
  295. /*
  296. * If this is the first time to go into the loop and
  297. * offset is not beyond the end offset, it will be a
  298. * hole at this offset
  299. */
  300. if (lastoff == startoff || lastoff < endoff)
  301. found = 1;
  302. break;
  303. }
  304. /*
  305. * If this is the first time to go into the loop and
  306. * offset is smaller than the first page offset, it will be a
  307. * hole at this offset.
  308. */
  309. if (lastoff == startoff && origin == SEEK_HOLE &&
  310. lastoff < page_offset(pvec.pages[0])) {
  311. found = 1;
  312. break;
  313. }
  314. for (i = 0; i < nr_pages; i++) {
  315. struct page *page = pvec.pages[i];
  316. struct buffer_head *bh, *head;
  317. /*
  318. * If the current offset is not beyond the end of given
  319. * range, it will be a hole.
  320. */
  321. if (lastoff < endoff && origin == SEEK_HOLE &&
  322. page->index > end) {
  323. found = 1;
  324. *offset = lastoff;
  325. goto out;
  326. }
  327. lock_page(page);
  328. if (unlikely(page->mapping != inode->i_mapping)) {
  329. unlock_page(page);
  330. continue;
  331. }
  332. if (!page_has_buffers(page)) {
  333. unlock_page(page);
  334. continue;
  335. }
  336. if (page_has_buffers(page)) {
  337. lastoff = page_offset(page);
  338. bh = head = page_buffers(page);
  339. do {
  340. if (buffer_uptodate(bh) ||
  341. buffer_unwritten(bh)) {
  342. if (origin == SEEK_DATA)
  343. found = 1;
  344. } else {
  345. if (origin == SEEK_HOLE)
  346. found = 1;
  347. }
  348. if (found) {
  349. *offset = max_t(loff_t,
  350. startoff, lastoff);
  351. unlock_page(page);
  352. goto out;
  353. }
  354. lastoff += bh->b_size;
  355. bh = bh->b_this_page;
  356. } while (bh != head);
  357. }
  358. lastoff = page_offset(page) + PAGE_SIZE;
  359. unlock_page(page);
  360. }
  361. /*
  362. * The no. of pages is less than our desired, that would be a
  363. * hole in there.
  364. */
  365. if (nr_pages < num && origin == SEEK_HOLE) {
  366. found = 1;
  367. *offset = lastoff;
  368. break;
  369. }
  370. index = pvec.pages[i - 1]->index + 1;
  371. pagevec_release(&pvec);
  372. } while (index <= end);
  373. out:
  374. pagevec_release(&pvec);
  375. return found;
  376. }
  377. /*
  378. * ext4_seek_data() retrieves the offset for SEEK_DATA.
  379. */
  380. static loff_t ext4_seek_data(struct file *file, loff_t offset, loff_t maxsize)
  381. {
  382. struct inode *inode = file->f_mapping->host;
  383. struct ext4_map_blocks map;
  384. struct extent_status es;
  385. ext4_lblk_t start, last, end;
  386. loff_t dataoff, isize;
  387. int blkbits;
  388. int ret = 0;
  389. mutex_lock(&inode->i_mutex);
  390. isize = i_size_read(inode);
  391. if (offset >= isize) {
  392. mutex_unlock(&inode->i_mutex);
  393. return -ENXIO;
  394. }
  395. blkbits = inode->i_sb->s_blocksize_bits;
  396. start = offset >> blkbits;
  397. last = start;
  398. end = isize >> blkbits;
  399. dataoff = offset;
  400. do {
  401. map.m_lblk = last;
  402. map.m_len = end - last + 1;
  403. ret = ext4_map_blocks(NULL, inode, &map, 0);
  404. if (ret > 0 && !(map.m_flags & EXT4_MAP_UNWRITTEN)) {
  405. if (last != start)
  406. dataoff = last << blkbits;
  407. break;
  408. }
  409. /*
  410. * If there is a delay extent at this offset,
  411. * it will be as a data.
  412. */
  413. es.start = last;
  414. (void)ext4_es_find_extent(inode, &es);
  415. if (last >= es.start &&
  416. last < es.start + es.len) {
  417. if (last != start)
  418. dataoff = last << blkbits;
  419. break;
  420. }
  421. /*
  422. * If there is a unwritten extent at this offset,
  423. * it will be as a data or a hole according to page
  424. * cache that has data or not.
  425. */
  426. if (map.m_flags & EXT4_MAP_UNWRITTEN) {
  427. int unwritten;
  428. unwritten = ext4_find_unwritten_pgoff(inode, SEEK_DATA,
  429. &map, &dataoff);
  430. if (unwritten)
  431. break;
  432. }
  433. last++;
  434. dataoff = last << blkbits;
  435. } while (last <= end);
  436. mutex_unlock(&inode->i_mutex);
  437. if (dataoff > isize)
  438. return -ENXIO;
  439. if (dataoff < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET))
  440. return -EINVAL;
  441. if (dataoff > maxsize)
  442. return -EINVAL;
  443. if (dataoff != file->f_pos) {
  444. file->f_pos = dataoff;
  445. file->f_version = 0;
  446. }
  447. return dataoff;
  448. }
  449. /*
  450. * ext4_seek_hole() retrieves the offset for SEEK_HOLE.
  451. */
  452. static loff_t ext4_seek_hole(struct file *file, loff_t offset, loff_t maxsize)
  453. {
  454. struct inode *inode = file->f_mapping->host;
  455. struct ext4_map_blocks map;
  456. struct extent_status es;
  457. ext4_lblk_t start, last, end;
  458. loff_t holeoff, isize;
  459. int blkbits;
  460. int ret = 0;
  461. mutex_lock(&inode->i_mutex);
  462. isize = i_size_read(inode);
  463. if (offset >= isize) {
  464. mutex_unlock(&inode->i_mutex);
  465. return -ENXIO;
  466. }
  467. blkbits = inode->i_sb->s_blocksize_bits;
  468. start = offset >> blkbits;
  469. last = start;
  470. end = isize >> blkbits;
  471. holeoff = offset;
  472. do {
  473. map.m_lblk = last;
  474. map.m_len = end - last + 1;
  475. ret = ext4_map_blocks(NULL, inode, &map, 0);
  476. if (ret > 0 && !(map.m_flags & EXT4_MAP_UNWRITTEN)) {
  477. last += ret;
  478. holeoff = last << blkbits;
  479. continue;
  480. }
  481. /*
  482. * If there is a delay extent at this offset,
  483. * we will skip this extent.
  484. */
  485. es.start = last;
  486. (void)ext4_es_find_extent(inode, &es);
  487. if (last >= es.start &&
  488. last < es.start + es.len) {
  489. last = es.start + es.len;
  490. holeoff = last << blkbits;
  491. continue;
  492. }
  493. /*
  494. * If there is a unwritten extent at this offset,
  495. * it will be as a data or a hole according to page
  496. * cache that has data or not.
  497. */
  498. if (map.m_flags & EXT4_MAP_UNWRITTEN) {
  499. int unwritten;
  500. unwritten = ext4_find_unwritten_pgoff(inode, SEEK_HOLE,
  501. &map, &holeoff);
  502. if (!unwritten) {
  503. last += ret;
  504. holeoff = last << blkbits;
  505. continue;
  506. }
  507. }
  508. /* find a hole */
  509. break;
  510. } while (last <= end);
  511. mutex_unlock(&inode->i_mutex);
  512. if (holeoff > isize)
  513. holeoff = isize;
  514. if (holeoff < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET))
  515. return -EINVAL;
  516. if (holeoff > maxsize)
  517. return -EINVAL;
  518. if (holeoff != file->f_pos) {
  519. file->f_pos = holeoff;
  520. file->f_version = 0;
  521. }
  522. return holeoff;
  523. }
  524. /*
  525. * ext4_llseek() handles both block-mapped and extent-mapped maxbytes values
  526. * by calling generic_file_llseek_size() with the appropriate maxbytes
  527. * value for each.
  528. */
  529. loff_t ext4_llseek(struct file *file, loff_t offset, int origin)
  530. {
  531. struct inode *inode = file->f_mapping->host;
  532. loff_t maxbytes;
  533. if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
  534. maxbytes = EXT4_SB(inode->i_sb)->s_bitmap_maxbytes;
  535. else
  536. maxbytes = inode->i_sb->s_maxbytes;
  537. switch (origin) {
  538. case SEEK_SET:
  539. case SEEK_CUR:
  540. case SEEK_END:
  541. return generic_file_llseek_size(file, offset, origin,
  542. maxbytes, i_size_read(inode));
  543. case SEEK_DATA:
  544. return ext4_seek_data(file, offset, maxbytes);
  545. case SEEK_HOLE:
  546. return ext4_seek_hole(file, offset, maxbytes);
  547. }
  548. return -EINVAL;
  549. }
  550. const struct file_operations ext4_file_operations = {
  551. .llseek = ext4_llseek,
  552. .read = do_sync_read,
  553. .write = do_sync_write,
  554. .aio_read = generic_file_aio_read,
  555. .aio_write = ext4_file_write,
  556. .unlocked_ioctl = ext4_ioctl,
  557. #ifdef CONFIG_COMPAT
  558. .compat_ioctl = ext4_compat_ioctl,
  559. #endif
  560. .mmap = ext4_file_mmap,
  561. .open = ext4_file_open,
  562. .release = ext4_release_file,
  563. .fsync = ext4_sync_file,
  564. .splice_read = generic_file_splice_read,
  565. .splice_write = generic_file_splice_write,
  566. .fallocate = ext4_fallocate,
  567. };
  568. const struct inode_operations ext4_file_inode_operations = {
  569. .setattr = ext4_setattr,
  570. .getattr = ext4_getattr,
  571. #ifdef CONFIG_EXT4_FS_XATTR
  572. .setxattr = generic_setxattr,
  573. .getxattr = generic_getxattr,
  574. .listxattr = ext4_listxattr,
  575. .removexattr = generic_removexattr,
  576. #endif
  577. .get_acl = ext4_get_acl,
  578. .fiemap = ext4_fiemap,
  579. };