All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] When fstrim, ocfs2_trim_group beyond end of device.
@ 2015-01-29  1:02 Changlimin
  0 siblings, 0 replies; only message in thread
From: Changlimin @ 2015-01-29  1:02 UTC (permalink / raw)
  To: ocfs2-devel

Hi?
         In Linux 3.18 kenrel, when fstrim a ocfs2 file system, fstrim shows IO error. Some logs in syslog:
                   attempt to access beyond end of device
                   sdb: rw=129, want=8390656, limit=8388608
                   (fstrim,36298,6):ocfs2_trim_group:7274 ERROR: status = -5
                   (fstrim,36298,6):ocfs2_trim_fs:7374 ERROR: status = -5

         In ocfs2_trim_group, next shoud compare with ip_clusters before call ocfs2_trim_extent.
         while (start < max) {
                   start = ocfs2_find_next_zero_bit(bitmap, max, start);
                   if (start >= max)
                            break;
                   next = ocfs2_find_next_bit(bitmap, max, start);

        /* next should compare with ip_clusters, ensure within device. But how to get ip_clusters here? Should pass inode from the caller? */
                   if (next > ip_clusters)
                            next = ip_clusters;

                   if (next > start && (next - start) >= minbits) {
                            ret = ocfs2_trim_extent(sb, gd,
                                                        start, next - start);
                            if (ret < 0) {
                                     mlog_errno(ret);
                                     break;
                            }
                            count += next - start;
                   }

Regards,
Changlimin
-------------------------------------------------------------------------------------------------------------------------------------
????????????????????????????????????????
????????????????????????????????????????
????????????????????????????????????????
???
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20150129/cdf506f6/attachment-0001.html 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-29  1:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  1:02 [Ocfs2-devel] When fstrim, ocfs2_trim_group beyond end of device Changlimin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.